Beyond Tokenization: Direct Timestep Embedding and Contrastive Alignment for Time-Series Question Answering

arXiv cs.CL Papers

Summary

This paper introduces CADE, a framework for time-series question answering that maps each timestep directly into the LLM embedding space and uses a one-directional supervised contrastive loss to align time-series representations with frozen text anchors, outperforming existing baselines on the Time-MQA benchmark.

arXiv:2606.18986v1 Announce Type: new Abstract: Recent advances in large language models (LLMs) have given rise to time-series question answering (TSQA), which formulates time-series analysis as natural-language question answering. However, directly feeding raw numerical series into LLMs suffers from a tokenization bottleneck: Byte Pair Encoding fragments continuous values into unstable tokens whose embeddings lack meaningful metric structure, resulting in the loss of magnitude, scale, and trend information. Prior methods use patch-based encoders that split the series into fixed windows, locking in one granularity that breaks patterns and hides exact timesteps, through a separate module that rarely transfers across datasets with different lengths or sampling rates. To address this challenge, we propose CADE (Contrastive Alignment with Direct Embedding), a novel framework for TSQA built upon two key components: direct timestep embedding and semantic alignment. The proposed framework maps each timestep directly into the LLM embedding space through a point-wise linear encoder and MLP projector, preserving exact index-level access while eliminating the need for patching and padding. To further bridge the semantic gap between time-series and language representations, we introduce a novel one-directional supervised contrastive loss that aligns time-series embeddings with frozen class-name text anchors. Experimental results on the public Time-MQA benchmark demonstrate that our framework consistently improves performance across six TSQA tasks, outperforming both open-source and proprietary LLM baselines.
Original Article
View Cached Full Text

Cached at: 06/18/26, 05:47 AM

# Direct Timestep Embedding and Contrastive Alignment for Time-Series Question Answering
Source: [https://arxiv.org/html/2606.18986](https://arxiv.org/html/2606.18986)
###### Abstract

Recent advances in large language models \(LLMs\) have given rise to time\-series question answering \(TSQA\), which formulates time\-series analysis as natural\-language question answering\. However, directly feeding raw numerical series into LLMs suffers from a tokenization bottleneck: Byte Pair Encoding fragments continuous values into unstable tokens whose embeddings lack meaningful metric structure, resulting in the loss of magnitude, scale, and trend information\. Prior methods use patch\-based encoders that split the series into fixed windows, locking in one granularity that breaks patterns and hides exact timesteps, through a separate module that rarely transfers across datasets with different lengths or sampling rates\. To address this challenge, we propose CADE \(Contrastive Alignment with Direct Embedding\), a novel framework for TSQA built upon two key components: direct timestep embedding and semantic alignment\. The proposed framework maps each timestep directly into the LLM embedding space through a point\-wise linear encoder and MLP projector, preserving exact index\-level access while eliminating the need for patching and padding\. To further bridge the semantic gap between time\-series and language representations, we introduce a novel one\-directional supervised contrastive loss that aligns time\-series embeddings with frozen class\-name text anchors\. Experimental results on the public Time\-MQA benchmark demonstrate that our framework consistently improves performance across six TSQA tasks, outperforming both open\-source and proprietary LLM baselines\.

## 1Introduction

Time series analysis underpins critical tasks such as anomaly detection, classification, forecasting, and imputation, with applications across healthcare monitoring, industrial maintenance, and financial modeling\(Wenet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib36)\)\. Traditional deep learning models have achieved strong results in capturing temporal dependencies\(Zenget al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib29); Wuet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib30); Nieet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib31)\), while the rise of Large Language Models \(LLMs\) has shown remarkable reasoning and generalization across diverse domains\(Achiamet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib32); Liuet al\.,[2024a](https://arxiv.org/html/2606.18986#bib.bib33); Yanget al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib34)\), motivating efforts to extend their capabilities to time series\. Most existing approaches use LLMs as feature extractors or auxiliary modules rather than end\-to\-end solvers\(Jinet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib3); Sunet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib4); Zhouet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib35)\)\. A more ambitious paradigm, time series question answering \(TSQA\), recasts each task as a natural\-language question and lets the LLM produce the answer directly\. For example, 3D gait acceleration from a wearable accelerometer can be framed as a structured question, with the LLM diagnosing whether the sample indicates freezing of gait\. Yet feeding raw time series into an LLM raises a fundamental representational problem: standard tokenizers struggle to encode continuous numerical values\.

![Refer to caption](https://arxiv.org/html/2606.18986v1/x1.png)

Figure 1:Comparison of time series representation strategies\.The core difficulty lies in how LLMs represent continuous numerical values, and it originates at the level of tokenization\. Byte Pair Encoding \(BPE\)\(Sennrichet al\.,[2016](https://arxiv.org/html/2606.18986#bib.bib37)\), the standard tokenizer in most LLMs, builds its vocabulary from frequency patterns in text, where numbers are sparse and long\-tailed\. As a result, it merges digits according to textual co\-occurrence rather than place value: a value such as 182\.62 may be split into fragments like \[18\], \[2\.\], \[62\]\. This segmentation is also context\-dependent, with the same digits tokenized differently across contexts, so the model never receives a stable signal that two numbers are close in magnitude\. A single value is thus fractured into unstable symbols that carry no metric structure\. Consequently, the model cannot recover magnitude, scale, or trend, the very properties on which time\-series reasoning depends, which fundamentally limits the reliability of current methods on TSQA\.

To bypass tokenization, prior LLM\-based time series methods\(Wanget al\.,[2025b](https://arxiv.org/html/2606.18986#bib.bib16); Jinet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib3); Xieet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib27)\)adopt a patch\-based encoder that segments the series into fixed\-length windows and projects each window into a continuous embedding\. This commits the model to a single temporal granularity fixed before training: the patch length imposes window boundaries that may cut across meaningful patterns and fold distinct timesteps into one token, so the model cannot natively identify the exact temporal index\. Such an encoder for TSQA is also a separate, often pretrained module\(Wanget al\.,[2025b](https://arxiv.org/html/2606.18986#bib.bib16)\)that adds parameters and a domain\-specific inductive bias that need not transfer across datasets with different lengths or sampling rates\.

We instead propose CADE \(Contrastive Alignment with Direct Embedding\), which uses a linear projection to map each time\-series value into a continuous embedding, illustrated in Figure[1](https://arxiv.org/html/2606.18986#S1.F1)\. Unlike BPE, which fractures a value into unstable sub\-tokens that carry no sense of magnitude, this direct mapping keeps each value intact as a single continuous vector and places numerically close values close in the embedding space, restoring the metric structure that text tokenization discards\. Because each token corresponds one\-to\-one with a timestep, the model can address any individual index, which is essential for tasks such as imputation that operate on specific positions\. Furthermore, this needs no patch size and no padding: with token count equal to sequence length, the same projection ingests series of arbitrary length and sampling rate without re\-segmentation or per\-dataset re\-tuning, preserves the original temporal resolution, and lets the LLM’s attention model both local and long\-range dependencies directly\.

To further align time\-series embeddings with the LLM’s embedding space, we add an auxiliary one\-directional supervised contrastive loss constructed from time\-series classification data\. For each classification sample, it pulls the time\-series embedding toward its class\-name text embedding and away from other classes, while the text anchors stay frozen so that only the time\-series side moves into the LLM’s lexical space\. Although this signal comes solely from classification samples, the encoder and projector it updates are shared by all six tasks; the loss therefore regularizes the shared pathway rather than fitting classification alone, yielding more discriminative and semantically grounded representations\.

The main contributions of this work are as follows:

- •To the best of our knowledge, this is among the first works to use a lightweight linear encoder, rather than a patch\-based encoder, to map time\-series values into continuous embeddings for multi\-task time\-series question answering\. Despite its simplicity, this design substantially improves LLM performance across TSQA tasks\.
- •We introduce a novel one\-directional supervised contrastive loss that aligns projected time\-series embeddings with frozen class\-text anchors, strengthening the semantic correspondence between time\-series features and the LLM’s linguistic reasoning\.
- •Through extensive experiments on the Time\-MQA datasets, we show that CADE achieves competitive or superior performance against both open\-source and proprietary LLMs\. The source code for CADE and all relevant baseline models are openly accessible on https://github\.com/YafengWu/CADE\.

## 2Related Work

### 2\.1Large Language Models for Time Series Analysis

Recent work has explored adapting LLMs for time series tasks through two main directions\. First, prompt\-based methods such as PromptCast\(Xue and Salim,[2023](https://arxiv.org/html/2606.18986#bib.bib1)\)and LLMTime\(Gruveret al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib2)\)serialize numerical sequences into text prompts for direct forecasting\. Second, multimodal architectures like Time\-LLM\(Jinet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib3)\)and UniTime\(Liuet al\.,[2024c](https://arxiv.org/html/2606.18986#bib.bib5)\)align temporal representations with language model embeddings for cross\-domain forecasting\. A parallel line of work develops dedicated time\-series foundation models such as TimesFM\(Daset al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib6)\), Chronos\(Ansariet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib7)\), and Time\-MOE\(Shiet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib18)\)pre\-train transformers specifically on temporal data for the forecasting task\. These models are primarily designed for forecasting rather than text\-based question answering, so they cannot be used for question answering and are not compared in our work\. Among the remaining two directions, multimodal methods do not fully leverage the reasoning and generation capabilities of pretrained LLMs, while prompt\-based methods suffer from imprecise numerical representation\. This motivates a unified approach that enables LLMs to directly reason over time series inputs and solve diverse temporal tasks\.

### 2\.2Temporal Question Answering

Several recent works study question answering over time series data\. ChatTS\(Xieet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib27)\)is a time\-series multimodal LLM trained on synthetic time\-series–text pairs for temporal understanding and reasoning, targeting open\-ended time\-series reasoning rather than the task\-oriented, multi\-task setting we study\. ChatTime\(Wanget al\.,[2025a](https://arxiv.org/html/2606.18986#bib.bib28)\)is a pretrained time\-series foundation model for forecasting and time\-series QA\. We focus on adapting general\-purpose LLMs to time\-series question answering and therefore compare only against existing LLM\-based adaptation methods rather than time\-series foundation models\. Time\-MQA\(Konget al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib15)\)introduces the Time\-MQA dataset and uses LoRA to directly fine\-tune an LLM across a diverse set of temporal tasks, such as classification, anomaly detection, and forecasting\. ITFormer\(Wanget al\.,[2025b](https://arxiv.org/html/2606.18986#bib.bib16)\)adapts the Q\-Former structure for the Time\-Series Question Answering task and releases the EngineMT\-QA dataset\.

Despite their progress, these methods inherit the representational limitations discussed above: Time\-MQA feeds numerical values through the LLM’s text tokenizer and thus suffers from unstable digit segmentation and the absence of number\-line geometry, while ITFormer and ChatTS rely on patch\-based encoders that fix a single temporal granularity and obstruct per\-timestep generation\. In contrast, we map each timestep directly into the LLM’s embedding space with a lightweight linear encoder and MLP projector, avoiding both tokenization artifacts and patch\-level granularity constraints\.

Beyond representation, aligning time series and natural language, inspired by vision–language alignment in models such as LLaVA\(Liuet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib10)\)and InstructBLIP\(Daiet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib11)\), is itself an active direction\(Liuet al\.,[2025b](https://arxiv.org/html/2606.18986#bib.bib20)\), with approaches based on cross\-attention\(Jinet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib3); Liuet al\.,[2024b](https://arxiv.org/html/2606.18986#bib.bib21)\), contrastive learning\(Chenet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib23); Donget al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib24); Sunet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib4)\), and knowledge distillation\(Liuet al\.,[2025a](https://arxiv.org/html/2606.18986#bib.bib22)\)\. However, existing contrastive methods such as TS\-CLIP\(Chenet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib23)\), TimesCLIP\(Donget al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib24)\), and TEST\(Sunet al\.,[2024](https://arxiv.org/html/2606.18986#bib.bib4)\)either apply contrastive learning to narrow tasks \(e\.g\., classification or forecasting\) without an LLM, or treat the LLM merely as a pattern extractor by appending task\-specific heads\. In contrast, we align timestep embeddings with the LLM’s lexical space through a one\-directional supervised contrastive loss, directly employing contrastive alignment for time\-series question answering across six tasks within a unified framework\.

## 3Method

### 3\.1Problem Formulation

We address*time\-series question answering*, in which a LLM is asked to answer natural\-language questions grounded in a univariate time series\. Each sample is a triple\(𝐱,q,τ\)\(\\mathbf\{x\},q,\\tau\), where𝐱=\{x1,x2,…,xT\}\\mathbf\{x\}=\\\{x\_\{1\},x\_\{2\},\\dots,x\_\{T\}\\\}withxt∈ℝx\_\{t\}\\in\\mathbb\{R\}is a univariate time series of lengthTT,qqis a natural\-language prompt that poses a question about𝐱\\mathbf\{x\}and contains statistical features, andτ\\taudenotes the task type\. The series lengthTTvaries across samples\.

We consider six task types,τ∈\{\\tau\\in\\\{anomaly detection, classification, multiple choice, true/false, forecasting, imputation\}\\\}, and unify them under a single generative interface: regardless ofτ\\tau, the model produces a textual responseR=\{r1,…,rL\}R=\\\{r\_\{1\},\\dots,r\_\{L\}\\\}autoregressively, rather than relying on task\-specific output heads, whereLLdenotes the number of tokens in the generated answer\. Formally, the model defines a conditional distribution

pθ​\(R∣𝐱,q\)=∏i=1Lpθ​\(ri∣r<i,𝐱,q\),p\_\{\\theta\}\(R\\mid\\mathbf\{x\},q\)=\\prod\_\{i=1\}^\{L\}p\_\{\\theta\}\\\!\\left\(r\_\{i\}\\mid r\_\{<i\},\\mathbf\{x\},q\\right\),\(1\)whereθ\\thetais the parameter of the LLM\. The objective is to maximize the likelihood of the textual responseRRgiven the time series and prompt\.

### 3\.2Preprocess

Normalization\.zz\-score normalization is used for each series independently within its own question\. Specifically, for a time series𝐱=\{x1,…,xT\}\\mathbf\{x\}=\\\{x\_\{1\},\\dots,x\_\{T\}\\\}, each value is normalized using the mean and standard deviation computed from that same series:

xt′=xt−μσ,x^\{\\prime\}\_\{t\}=\\frac\{x\_\{t\}\-\\mu\}\{\\sigma\},\(2\)wherextx\_\{t\}is the original value at time steptt,xt′x^\{\\prime\}\_\{t\}is the normalized value, the full normalized series is denoted𝐱′=\{x1′,…,xT′\}\\mathbf\{x\}^\{\\prime\}=\\\{x^\{\\prime\}\_\{1\},\\dots,x^\{\\prime\}\_\{T\}\\\}, andμ\\muandσ\\sigmaare respectively, the mean and standard deviation of the time series𝐱\\mathbf\{x\}\.

![Refer to caption](https://arxiv.org/html/2606.18986v1/x2.png)

Figure 2:Framework of the proposed CADE\.Statistical Features\.Instance\-levelzz\-score normalization removes absolute scale and offset information that can be critical for some tasks\. For example, multiple choice and true/false question tasks have some questions about statistical features such as mean and maximum values\. To preserve this information, we augment the text prompt with statistical summaries computed from the*raw*\(pre\-normalization\) series\. After the normalized series is presented, we append the following to the textual part of the prompt:

> The above is the normalized time series data\. Its raw data has the following statistical information: mean:<mean\_val\>, standard deviation:<std\_val\>, minimum:<min\_val\>, maximum:<max\_val\>, median:<median\_val\>\.

This design lets the model reason over the shape of the normalized signal while still having access, in textual form, to the absolute statistics that normalization discards\.

### 3\.3Architecture

As illustrated in Figure[2](https://arxiv.org/html/2606.18986#S3.F2), the proposed framework CADE consists of four components: \(i\) a*linear time\-series encoder*that maps the normalized series into a continuous feature space; \(ii\) an*MLP projector*that bridges the time\-series and language modalities by projecting the encoded features into the LLM embedding space; \(iii\) an*LLM*module: a pretrained LLM that autoregressively generates the answer from the fused time\-series and text tokens; and \(iv\) a*one\-directional SupCon loss*that aligns the projected time\-series embeddings with frozen class\-text embeddings for the classification task\. We describe the first three components below, and detail the contrastive module in Section[3\.4](https://arxiv.org/html/2606.18986#S3.SS4)\.

Linear TS Encoder\.Following the design philosophy of vision–language models such as LLaVA\(Liuet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib10)\), which bridge a non\-text modality into an LLM through an image encoder followed by a projection module, CADE maps the time series into the language model with an analogous*encoder–projector*pair: a linear time\-series encoder produces a continuous feature sequence, and an MLP projector aligns it with the LLM embedding space\. Concretely, a single linear layer maps the normalized time series𝐱′∈ℝT×1\\mathbf\{x\}^\{\\prime\}\\in\\mathbb\{R\}^\{T\\times 1\}into adt​sd\_\{ts\}\-dimensional continuous feature space, yielding a sequence of encoded featuresh∈ℝT×dt​sh\\in\\mathbb\{R\}^\{T\\times d\_\{ts\}\}:

h=Linear​\(𝐱′\),h∈ℝT×dt​s\.h=\\mathrm\{Linear\}\(\\mathbf\{x\}^\{\\prime\}\),\\qquad h\\in\\mathbb\{R\}^\{T\\times d\_\{ts\}\}\.\(3\)
This linear TS encoder has three advantages\. It is*index\-aligned*: the one\-to\-one correspondence between embeddings and timesteps preserves exact positional addressability, which the generation tasks \(forecasting and imputation\) exploit\. It is*resolution\-agnostic*: by adopting point\-wise tokenization, the encoder preserves the completeness of temporal information\(Shiet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib18)\)and handles series of arbitrary length and sampling rate without patching, padding, or per\-dataset re\-tuning, which enhances the model’s flexibility and broad applicability to variable\-length sequences while keeping the LLM’s attention operating at the signal’s native resolution\. Finally, it is*lightweight*: a single linear layer introduces far fewer parameters than a patch\-based transformer encoder and requires no separate pretraining, yet, as our experiments show, suffices to inject the time series into the LLM effectively\.

MLP Projector\.The encoded features are then projected into the LLM embedding space with an MLP, mapping each time step embedding fromdt​sd\_\{ts\}todl​l​md\_\{llm\}dimensions:

Et​s=MLP​\(h\),Et​s∈ℝT×dl​l​m,E\_\{ts\}=\\mathrm\{MLP\}\(h\),\\qquad E\_\{ts\}\\in\\mathbb\{R\}^\{T\\times d\_\{llm\}\},\(4\)wheredl​l​md\_\{llm\}denotes the token\-embedding dimension of the backbone LLM, so that each of theTTtime\-series tokens is mapped into the LLM’s lexical space and can be concatenated with the text embeddings\. The MLP has the following structure:

𝐳\\displaystyle\\mathbf\{z\}=GELU​\(𝐖1​h\+𝐛1\),\\displaystyle=\\mathrm\{GELU\}\\\!\\big\(\\mathbf\{W\}\_\{1\}\\,h\+\\mathbf\{b\}\_\{1\}\\big\),𝐖1\\displaystyle\\mathbf\{W\}\_\{1\}∈ℝ4​dt​s×dt​s,\\displaystyle\\in\\mathbb\{R\}^\{4\\,d\_\{ts\}\\times d\_\{ts\}\},\(5\)Et​s\\displaystyle E\_\{ts\}=LayerNorm​\(𝐖2​𝐳\+𝐛2\),\\displaystyle=\\mathrm\{LayerNorm\}\\\!\\big\(\\mathbf\{W\}\_\{2\}\\,\\mathbf\{z\}\+\\mathbf\{b\}\_\{2\}\\big\),𝐖2\\displaystyle\\mathbf\{W\}\_\{2\}∈ℝdl​l​m×4​dt​s\.\\displaystyle\\in\\mathbb\{R\}^\{d\_\{llm\}\\times 4\\,d\_\{ts\}\}\.\(6\)a non\-linear projection provides the capacity to bridge the two modalities\. The final LayerNorm stabilizes training\.

LLM\.A pretrained LLM generates answers from the fused time\-series and text tokens:

R=pθ​\(f​\(Et​s,Et​e​x​t\)\),R=p\_\{\\theta\}\\big\(f\(E\_\{ts\},E\_\{text\}\)\\big\),\(7\)whereRRis the generated response,pθp\_\{\\theta\}is the LLM decoder with parametersθ\\theta, defined in formula[1](https://arxiv.org/html/2606.18986#S3.E1),Et​sE\_\{ts\}is the time\-series embedding, andEt​e​x​tE\_\{text\}is the text embedding\. The sequence fusionf​\(⋅\)f\(\\cdot\)depends on the task\. For time\-series understanding tasks \(classification, anomaly detection, multiple choice, true/false\), we useEt​sE\_\{ts\}to replace the raw time series\. Raw numerical values are difficult for LLMs to interpret directly; substituting the learned embedding provides a more language\-compatible representation that the model can reason over more effectively\. For time\-series generation tasks \(forecasting and imputation\), we sendEt​sE\_\{ts\}and the raw time series together: the TS embedding provides high\-level temporal understanding, while the raw values give the LLM the precise numerical grounding it needs to perform the task\.

### 3\.4One\-Directional Supervised Contrastive Loss

To better regularize the projected time\-series embeddings toward the semantic structure of the LLM’s embedding space, we introduce a one\-directional supervised contrastive loss\. Among the six tasks, only classification possesses a finite set of discrete, mutually exclusive class labels, making it uniquely suited for this objective\. We therefore apply the loss exclusively to classification samples: it pulls each sample’s projected time\-series embedding toward its corresponding class\-text embedding and pushes it away from those of other classes\. We call this loss*one\-directional*because gradients flow only from the time\-series side toward the frozen text targets, and never into the LLM’s embedding layer\. The one\-directional supervised contrastive Loss consists of four components, described below\.

Pooled TS Projection\.During the forward pass, each sample is checked for whether it belongs to the classification task; non\-classification samples are skipped entirely and contribute no contrastive signal\. For each classification sample, we obtain the contrastive anchor by mean\-pooling the projected time\-series sequenceEt​s=\{𝐞t​s\(1\),…,𝐞t​s\(T\)\}E\_\{ts\}=\\\{\\mathbf\{e\}\_\{ts\}^\{\(1\)\},\\dots,\\mathbf\{e\}\_\{ts\}^\{\(T\)\}\\\}over the time dimension:

𝐞¯t​s=1T​∑t=1T𝐞t​s\(t\),\\bar\{\\mathbf\{e\}\}\_\{ts\}=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\mathbf\{e\}\_\{ts\}^\{\(t\)\},\(8\)where𝐞t​s\(t\)∈ℝdllm\\mathbf\{e\}\_\{ts\}^\{\(t\)\}\\in\\mathbb\{R\}^\{d\_\{\\text\{llm\}\}\}is thett\-th output of the MLP projector\. Each pooled TS projection is paired with its class labelc∈𝒞c\\in\\mathcal\{C\}for use in the subsequent steps\.

Memory Queue\.In a multi\-task training regime with six tasks, any given mini\-batch may contain few or even zero classification samples, leaving insufficient anchors to form meaningful positive–negative contrasts\. To address this, we maintain a circular memory queueQ=\{\(𝐞¯t​s\(k\),c\(k\)\)\}k=1KQ=\\bigl\\\{\(\\bar\{\\mathbf\{e\}\}\_\{ts\}^\{\(k\)\},\\;c^\{\(k\)\}\)\\bigr\\\}\_\{k=1\}^\{K\}of capacityMM, where each entry stores a*detached*pooled TS projection𝐞¯t​s\(k\)\\bar\{\\mathbf\{e\}\}\_\{ts\}^\{\(k\)\}paired with its class labelc\(k\)c^\{\(k\)\}\. HereK≤MK\\leq Mdenotes the current occupancy, which grows until the queue reaches capacityMMand is thereafter held atMMby evicting the oldest entry in FIFO order\. A warmup thresholdMminM\_\{\\min\}is enforced: if\|Q\|<Mmin\|Q\|<M\_\{\\min\}, the current batch’s anchors are enqueued but the contrastive loss is not computed, ensuring a sufficiently diverse pool of negatives before the signal is applied\. Following standard MoCo practice\(Heet al\.,[2020](https://arxiv.org/html/2606.18986#bib.bib26)\), entries are enqueued*after*loss computation so that a sample is never used as its own key\.

Frozen Label Embeddings\.At training time, all class labels stored in the memory queue are mapped to their corresponding frozen label embeddings\. Specifically, for each classc∈𝒞c\\in\\mathcal\{C\}, a single label embedding𝐞c∈ℝdllm\\mathbf\{e\}\_\{c\}\\in\\mathbb\{R\}^\{d\_\{\\text\{llm\}\}\}is constructed once before training by tokenizing the lowercased label text and averaging the corresponding input\-embedding vectors:

𝐞c=1\|tc\|​∑j=1\|tc\|Embed​\(tcj\),\\displaystyle\\mathbf\{e\}\_\{c\}=\\frac\{1\}\{\|t\_\{c\}\|\}\\sum\_\{j=1\}^\{\|t\_\{c\}\|\}\\mathrm\{Embed\}\\\!\\bigl\(t\_\{c\}^\{\\,j\}\\bigr\),\(9\)EQ=\{𝐞c\(k\)\}k=1K\.\\displaystyle E\_\{Q\}=\\\{\\mathbf\{e\}\_\{c^\{\(k\)\}\}\\\}\_\{k=1\}^\{K\}\.\(10\)wheretcjt\_\{c\}^\{\\,j\}is thejj\-th token of class nameccandEmbed​\(⋅\)\\mathrm\{Embed\}\(\\cdot\)denotes the LLM input\-embedding layer\.EQE\_\{Q\}denotes the set of label embeddings corresponding to the class labels stored in the memory queue\. Each𝐞c\\mathbf\{e\}\_\{c\}is detached from the computation graph and receives no gradient updates throughout training\. This is precisely what makes the loss*one\-directional*: the time\-series projections learn to align with the text targets, but the text targets themselves remain fixed anchors in the shared embedding space\.

SupCon Loss\.Given the current pooled TS projection𝐞¯t​s\\bar\{\\mathbf\{e\}\}\_\{ts\}and the pool of frozen label embeddingsEQE\_\{Q\}retrieved from the queue, both sides areℓ2\\ell\_\{2\}\-normalized and cosine similarities are scaled by a temperatureγ\\gamma:

s\(k\)=𝐞¯t​s⋅𝐞c\(k\)‖𝐞¯t​s‖​‖𝐞c\(k\)‖​γ,s^\{\(k\)\}=\\frac\{\\bar\{\\mathbf\{e\}\}\_\{ts\}\\cdot\\mathbf\{e\}\_\{c^\{\(k\)\}\}\}\{\\bigl\\\|\\bar\{\\mathbf\{e\}\}\_\{ts\}\\bigr\\\|\\;\\bigl\\\|\\mathbf\{e\}\_\{c^\{\(k\)\}\}\\bigr\\\|\\;\\gamma\},\(11\)yielding a similarity vector𝐬∈ℝK\\mathbf\{s\}\\in\\mathbb\{R\}^\{K\}\. A positive mask is then constructed: entrykkis marked positive if the queue entrykkshares the same class label as the anchor\. We then adopt the supervised contrastive \(SupCon\) formulation\(Khoslaet al\.,[2020](https://arxiv.org/html/2606.18986#bib.bib25)\), which treats*all*queue entries sharing the anchor’s class label as positives:

ℒsc=−1\|𝒫\|​∑k∈𝒫log⁡exp⁡\(s\(k\)\)∑j=1Kexp⁡\(s\(j\)\),\\mathcal\{L\}\_\{\\mathrm\{sc\}\}=\-\\frac\{1\}\{\|\\mathcal\{P\}\|\}\\sum\_\{k\\in\\mathcal\{P\}\}\\log\\frac\{\\exp\(s^\{\(k\)\}\)\}\{\\displaystyle\\sum\_\{j=1\}^\{K\}\\exp\(s^\{\(j\)\}\)\},\(12\)where𝒫=\{k:c\(k\)=c\}\\mathcal\{P\}=\\\{k:c^\{\(k\)\}=c\\\}is the set of queue entries sharing the same class as the anchor, and the denominator sums over*all*queue entries\.

### 3\.5Training Loss

Cross\-Entropy Loss\.All six tasks are trained with the standard next\-token cross\-entropy loss\. Given the model responseRRand the ground\-truth answerAA:

ℒc​e=CrossEntropy​\(R,A\)\.\\mathcal\{L\}\_\{ce\}=\\mathrm\{CrossEntropy\}\(R,\\,A\)\.\(13\)
Total Loss\.The final training objective combines the generative and contrastive terms:

ℒ=ℒc​e\+λτ⋅ℒs​c,\\mathcal\{L\}=\\mathcal\{L\}\_\{ce\}\+\\lambda\_\{\\tau\}\\cdot\\mathcal\{L\}\_\{sc\},\(14\)where

λτ=\{λif​τ=classification,0otherwise,\\lambda\_\{\\tau\}=\\begin\{cases\}\\lambda&\\text\{if \}\\tau=\\text\{classification\},\\\\ 0&\\text\{otherwise\},\\end\{cases\}\(15\)Hereλ∈\[0,1\]\\lambda\\in\[0,1\]is a scalar weight that controls the strength of the contrastive term\. The contrastive branch introduces no additional trainable parameters; it reuses the encoder and projector from the main forward path\. Gradients fromℒs​c\\mathcal\{L\}\_\{sc\}therefore update only the TS Encoder and MLP Projector, whileℒc​e\\mathcal\{L\}\_\{ce\}updates the encoder, projector, and the LLM jointly\.

## 4Experiments

### 4\.1Dataset

We evaluate our method on the Time\-MQA Dataset\(Konget al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib15)\), a multi\-task question\-answering benchmark for time series understanding that covers six tasks: classification, anomaly detection \(AD\), true/false, multiple choice \(MCQ\), forecasting, and imputation\. The training and testing sets are randomly sampled, with the training set containing approximately 1,400 samples per task \(ranging from 1,293 for forecasting to 1,400 for classification, anomaly detection, and imputation\), totaling 8,286 samples, and the test set containing approximately 400 samples per task \(ranging from 379 for forecasting to 400 for classification, anomaly detection, and true/false\), totaling 2,376 samples\.

### 4\.2Baselines

We compare against four external methods that represent distinct design choices for time\-series question answering\. Our own internal variants, which degrade individual components of CADE, are introduced separately in the architectural ablations \(Section[4\.6\.1](https://arxiv.org/html/2606.18986#S4.SS6.SSS1)\)\.

Time\-MQA\(Konget al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib15)\): an LLM fine\-tuned with LoRA, jointly trained on all six tasks as a unified multi\-task model\.

Time\-MQA \(Full FT\): the same Time\-MQA recipe \(numeric series serialized to text via the BPE tokenizer, jointly trained on all six tasks\) but with full\-parameter fine\-tuning instead of LoRA, isolating whether more trainable capacity rescues the text\-serialization interface\.

ITFormer\(Wanget al\.,[2025b](https://arxiv.org/html/2606.18986#bib.bib16)\): a QFormer\-like\(Liet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib19)\)architecture designed for temporal\-textual question answering on the EngineMT\-QA dataset\. Since its original time series encoder is a pretrained PatchTST model that requires fixed\-length multivariate input, which is incompatible with the flexible\-length univariate time series in Time\-MQA, we replace it with a frozen Time\-MOE encoder\(Shiet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib18)\)and modify the cross\-attention module to handle univariate time series\.

Frozen Time\-MoE: Replaces the trainable linear time\-series encoder with a pretrained, frozen Time\-MoE encoder\(Shiet al\.,[2025](https://arxiv.org/html/2606.18986#bib.bib18)\), while keeping the same MLP projector and LoRA\-tuned LLM; only the projector and LoRA adapters are updated, under the cross\-entropy loss alone\. We freeze Time\-MoE following the setting of LLaVA\(Liuet al\.,[2023](https://arxiv.org/html/2606.18986#bib.bib10)\), where the time\-series encoder is pretrained and kept frozen during QA fine\-tuning, so that only the cross\-modal components adapt to the task\. This isolates whether a large pretrained time\-series foundation model yields a stronger frozen representation than a lightweight learnable encoder\.

### 4\.3Metrics

For the forecasting and imputation tasks, we adopt three metrics\. Throughout, letNNdenote the number of samples and𝟙​\[⋅\]\\mathbb\{1\}\[\\cdot\]the indicator function, which is11when its condition holds and0otherwise\.

\(1\) Format Compliance Rate \(FCR\), defined as the ratio of predictions whose output length exactly matches the requested length to the total number of predictions:

FCR=1N​∑i=1N𝟙​\[L​\(𝐲^i\)=Li\],\\mathrm\{FCR\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\mathbb\{1\}\\\!\\left\[L\(\\hat\{\\mathbf\{y\}\}\_\{i\}\)=L\_\{i\}\\right\],\(16\)whereLiL\_\{i\}is the required output length andL​\(𝐲^i\)L\(\\hat\{\\mathbf\{y\}\}\_\{i\}\)is the length of the generated output\.

Table 1:Implementation details\.\(2\) Own MSE: the mean squared error computed over only those values a model actually predicts\. As LLMs generate predictions as free\-form text, they frequently emit fewer points than requested; for instance, producing1010values when2121are required\. In such cases, Own MSE is evaluated solely on the predicted points \(the first1010\):

Own​\-​MSE=1Nc​∑i=1Nc1Ti​∑t=1Ti\(y^i,t−yi,t\)2,\\mathrm\{Own\\text\{\-\}MSE\}=\\frac\{1\}\{N\_\{c\}\}\\sum\_\{i=1\}^\{N\_\{c\}\}\\frac\{1\}\{T\_\{i\}\}\\sum\_\{t=1\}^\{T\_\{i\}\}\(\\hat\{y\}\_\{i,t\}\-y\_\{i,t\}\)^\{2\},\(17\)whereNcN\_\{c\}denotes the number of matched\-length predictions andTiT\_\{i\}is the prediction length for sampleii\.

\(3\) Shared MSE, the mean squared error computed on the intersection of samples for which*all*compared models produce correctly formatted outputs, enabling a head\-to\-head comparison on identical inputs:

Shared​\-​MSE=1Ns​∑i=1Ns1Ti​∑t=1Ti\(y^i,t−yi,t\)2,\\mathrm\{Shared\\text\{\-\}MSE\}=\\frac\{1\}\{N\_\{s\}\}\\sum\_\{i=1\}^\{N\_\{s\}\}\\frac\{1\}\{T\_\{i\}\}\\sum\_\{t=1\}^\{T\_\{i\}\}\(\\hat\{y\}\_\{i,t\}\-y\_\{i,t\}\)^\{2\},\(18\)whereNsN\_\{s\}denotes the number of samples for which all compared models produce format\-compliant outputs\.

For the remaining four tasks \(classification, anomaly detection, true/false, and multiple choice\), we useAccuracyas the evaluation metric, defined as

Accuracy=1N​∑i=1N𝟙​\[c^i=ci\],\\mathrm\{Accuracy\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\mathbb\{1\}\\\!\\left\[\\hat\{c\}\_\{i\}=c\_\{i\}\\right\],\(19\)wherec^i\\hat\{c\}\_\{i\}andcic\_\{i\}are the predicted and ground\-truth labels for sampleii, respectively\.

### 4\.4Implementation Details

Table 2:Main results on the Time\-MQA benchmark\. Internal variants are included for completeness and analyzed in Section[4\.6\.1](https://arxiv.org/html/2606.18986#S4.SS6.SSS1)\.MethodForecastingImputationADClassificationTrue/FalseMCQFCR↑\\uparrowOwn \(MSE\)↓\\downarrowShared \(MSE\)↓\\downarrowFCR↑\\uparrowOwn \(MSE\)↓\\downarrowShared \(MSE\)↓\\downarrowITFormer0383,107—04,284,782—0\.840\.79250\.77750\.5013Frozen Time\-MoE0\.58311,89240,6600\.8227,4375,9110\.84750\.810\.75750\.5113Frozen Random Linear0\.554315,40229,9170\.797587,5785,7980\.820\.8250\.75500\.5013Time\-MQA0\.46440,62630,7570\.652,399,0435,3180\.59750\.720\.67750\.471Time\-MQA \(Full FT\)0\.461,104,2443,479,0360\.572,391,8034,3130\.620\.7350\.70\.4332CADE w/o SupCon0\.596312,64936,8520\.77734,5326,0040\.8350\.80250\.750\.5189CADE0\.598296,89732,2680\.78525,2105,9990\.86250\.80750\.76750\.5315

Table[1](https://arxiv.org/html/2606.18986#S4.T1)summarizes the key training configurations of our model\. We build on a compact Qwen\-3\-0\.6B backbone fine\-tuned with LoRA, pairing it with a lightweight1→3841\\\!\\rightarrow\\\!384trainable linear time\-series encoder and an MLP projector, and train for2,0002\{,\}000steps with an effective batch size of3232on a single NVIDIA A100\. The auxiliary one\-directional supervised contrastive loss uses a memory bank of size512512and a loss weight ofλ=0\.1\\lambda=0\.1\.

### 4\.5Main Results

Table[2](https://arxiv.org/html/2606.18986#S4.T2)reports performance across all six Time\-MQA tasks\. Shared MSE is computed on the intersection of format\-compliant predictions across all models except ITFormer, whose zero compliance rate would otherwise result in an empty shared subset\. The shared subsets contain 79 forecasting samples and 148 imputation samples\. CADE attains the best score on five of the ten reported metrics, forecasting FCR and own MSE, imputation own MSE, anomaly detection, and MCQ, and remains competitive on the rest, whereas no baseline is consistently strong across both the generative \(forecasting, imputation\) and understanding \(AD, classification, judgment, MCQ\) task families\.

Query\-compression discards the resolution generative tasks require\.The QFormer\-style ITFormer compresses each series into a fixed, small set of learned query tokens, and this bottleneck is fatal on the generative tasks: it attainsFCR=0\\mathrm\{FCR\}=0on both forecasting and imputation, never emitting a single length\-matched sequence\. Its reported own\-MSE values \(383,107383\{,\}107for forecasting,4,284,7824\{,\}284\{,\}782for imputation\) are therefore not deployable predictions, and it admits no shared subset at all\. Because a fixed number of query tokens cannot encode a variable\-length series at per\-timestep granularity, the model loses exactly the positional structure needed to write back an output aligned to the requested horizon, whereas our per\-timestep linear encoding preserves it\.

On the shared\-subset metric\.CADE does not attain the lowest shared MSE \(forecasting:32,26832\{,\}268vs\. Frozen Random Linear’s29,91729\{,\}917; imputation:5,9995\{,\}999vs\. Time\-MQA \(Full FT\)’s4,3134\{,\}313\)\. However, the shared subset is restricted to rows that*every*model formats correctly, and is therefore bottlenecked by the lowest\-FCR models and dominated by the easiest cases\. Read alongside the markedly higher format\-compliance rates and lower own MSE of CADE, these near\-identical shared\-subset errors indicate that our model matches the baselines on easy inputs while additionally producing accurate, correctly formatted predictions on the substantially larger and harder set of inputs that the baselines fail to handle\.

### 4\.6Ablation Studies

We organize our ablations into two groups\.*Architectural ablations*\(Section[4\.6\.1](https://arxiv.org/html/2606.18986#S4.SS6.SSS1)\) isolate the contribution of each design choice in our model, the time\-series encoder and the auxiliary contrastive loss, by degrading one component at a time while holding everything else fixed\.*Hyperparameter ablations*\(Section[4\.6\.2](https://arxiv.org/html/2606.18986#S4.SS6.SSS2)\) then sweep the two components introduced by the contrastive loss, the memory\-bank size and the loss weightλ\\lambda\.

#### 4\.6\.1Architectural Ablations

To attribute CADE’s gains to individual design choices, we introduce two internal variants that each degrade a single component of the full model, and analyze them against the external baselines using the numbers reported in Table[2](https://arxiv.org/html/2606.18986#S4.T2)\.

Frozen Random Linear: Replaces the trainable linear encoder with a randomly\-initialized linear encoder that is held frozen throughout training, again updating only the projector and LoRA adapters under the cross\-entropy loss\. This random\-feature baseline isolates the benefit of learning the time\-series encoder rather than relying on a fixed random projection\.

CADE w/o SupCon: Our full architecture but supervised by the cross\-entropy loss only\. This isolates the contribution of the auxiliary contrastive loss in our final method\.

Table 3:Effect of memory\-bank size \(λ=0\.1\\lambda=0\.1\)\. The first row is the no\-auxiliary\-loss reference\. Bold marks the best value among the swept settings per column\.Table 4:Effect of contrastive loss weightλ\\lambda\(memory size=512=512\)\. Theλ=0\\lambda=0row is the no\-auxiliary\-loss reference\. Bold marks the best value among the active \(λ\>0\\lambda\>0\) settings per column\.A continuous linear encoder substantially outperforms BPE tokenization\.The sharpest contrast is between Time\-MQA, which serializes the numeric series into text and feeds it through the LLM’s BPE tokenizer, and the encoder\-based variants, which inject the series as continuous embeddings\. Replacing BPE with our trainable linear encoder improves*every*task: forecasting FCR rises from0\.460\.46to0\.5960\.596and its own MSE falls from440,626440\{,\}626to312,649312\{,\}649; imputation’s own MSE drops from2,399,0432\{,\}399\{,\}043to34,53234\{,\}532, nearly two orders of magnitude, and with the time series understanding tasks \(anomaly detection, classification, judgment, MCQ\) improving in the same direction \(Table[2](https://arxiv.org/html/2606.18986#S4.T2)\)\. Crucially, these gains already hold for “CADE w/o SupCon,” which differs from Time\-MQA*only*in the continuous encoder, isolating the BPE bypass as the dominant driver\. The effect is in fact independent of*learning*the encoder at all: the Frozen Random Linear baseline, whose1→3841\\\!\\rightarrow\\\!384projection is randomly initialized and never trained, already surpasses BPE serialization on every task, raising forecasting FCR to0\.5540\.554and cutting its own\-MSE to315,402315\{,\}402, raising imputation FCR to0\.79750\.7975and collapsing its own\-MSE from2,399,0432\{,\}399\{,\}043to87,57887\{,\}578, and lifting anomaly detection \(0\.5975→0\.820\.5975\\rightarrow 0\.82\), classification \(0\.72→0\.8250\.72\\rightarrow 0\.825\), judgment \(0\.6775→0\.7550\.6775\\rightarrow 0\.755\), and MCQ \(0\.471→0\.50130\.471\\rightarrow 0\.5013\)\. Since a fixed random projection carries no learned temporal information, this isolates the continuous\-token*interface*itself, rather than any encoder capacity, as the source of the improvement over BPE\. The simultaneous collapse of Time\-MQA’s FAR and own MSE further suggests that tokenizing long numeric strings both inflates sequence length and destroys the positional structure needed to emit length\-matched predictions\. Full\-parameter fine\-tuning of the same BPE\-serialized model \(Time\-MQA \(Full FT\)\) does not help and often hurts \(e\.g\. forecasting own\-MSE440,626→1,104,244440\{,\}626\\rightarrow 1\{,\}104\{,\}244, MCQ0\.471→0\.43320\.471\\rightarrow 0\.4332\), confirming the bottleneck is the serialization interface, not trainable capacity\.

Simplicity is sufficient: a linear encoder rivals a pretrained foundation encoder\.To isolate the effect of the encoder from that of the auxiliary contrastive loss, we compare “CADE w/o SupCon” against the frozen Time\-MoE baseline, since neither uses the contrastive objective\. Despite its minimal capacity, a single1→3841\\\!\\rightarrow\\\!384linear map, the trainable encoder is broadly competitive with the frozen pretrained Time\-MoE foundation encoder: it is better on forecasting FCR \(0\.5960\.596vs\.0\.580\.58\), forecasting shared MSE \(29,45729\{,\}457vs\.33,06033\{,\}060\), and MCQ \(0\.51890\.5189vs\.0\.51130\.5113\), essentially tied on forecasting own\-MSE \(312,649312\{,\}649vs\.311,892311\{,\}892\), classification \(0\.80250\.8025vs\.0\.810\.81\), and true/false \(0\.750\.75vs\.0\.75750\.7575\), and only somewhat behind on anomaly detection \(0\.8350\.835vs\.0\.84750\.8475\) and imputation own\-MSE \(34,53234\{,\}532vs\.27,43727\{,\}437\); none of the gaps in either direction is large\.

The one\-Directional SupCon loss strengthens cross\-modal alignment across tasks\.Comparing “CADE w/o SupCon” with the full model isolates the auxiliary one\-directional supervised contrastive loss, which pulls projected time\-series embeddings toward frozen class\-text anchors while leaving the text side fixed\. Although this signal is applied*only*to classification samples, the improvements are not confined to classification: anomaly detection rises from0\.8350\.835to0\.86250\.8625, judgment from0\.750\.75to0\.76750\.7675, MCQ from0\.51890\.5189to0\.53150\.5315, and imputation own MSE falls from34,53234\{,\}532to25,21025\{,\}210\(a27%27\\%reduction\)\. This spillover indicates that anchoring time\-series features to the LLM’s lexical embedding space regularizes the shared projection rather than merely sharpening the anchored task, thereby strengthening the semantic correspondence between time\-series representations and the model’s linguistic reasoning across the board\.

#### 4\.6\.2Hyperparameter Ablations

We ablate the two hyperparameters introduced by our auxiliary contrastive loss: the memory size and the loss weightλ\\lambda\. Additionally, we omit Shared MSE in this section because the shared\-subset MSE is inherently a cross\-model metric\. It is computed on the rows that all competing models format correctly, so its denominator is defined only with respect to a fixed set of distinct models\. In an ablation study, the compared systems are variants of the same method rather than distinct models, making Shared MSE unsuitable for this purpose\.

Performance is robust across memory\-bank sizes\.Table[3](https://arxiv.org/html/2606.18986#S4.T3)shows the same stability with respect to the bank capacity: across the3232–20482048range, anomaly detection stays within0\.840\.84–0\.86250\.8625and classification within0\.79750\.7975–0\.80750\.8075, with no setting degrading the model relative to the no\-loss reference on the understanding tasks\. Individual metrics peak at different sizes, forecasting own\-MSE is lowest at20482048and MCQ is highest at6464, but these isolated extrema do not transfer to the other metrics \(e\.g\. at20482048both anomaly detection and judgment fall\), and several of the differences are at the scale of one or two test samples\. We therefore read the sweep as evidence of robustness rather than a sharp global optimum\.

Turning the loss on helps; the method is not sensitive to its exact weight\.The clearest signal in Table[4](https://arxiv.org/html/2606.18986#S4.T4)is the gap betweenλ=0\\lambda=0and*any*positive weight on the understanding tasks: every active setting raises anomaly detection above the0\.8350\.835obtained without the loss \(to0\.84750\.8475–0\.86250\.8625\), and likewise improves MCQ \(0\.5189→0\.53150\.5189\\rightarrow 0\.5315–0\.54910\.5491\) and, for most settings, judgment\. Because the loss is applied only to classification samples, these consistent cross\-task gains indicate that anchoring time\-series embeddings to the lexical space regularizes the shared projection rather than over\-fitting the anchored task\. Importantly, performance remains stable across two orders of magnitude inλ\\lambdawith no collapse, showing the contribution of the loss is robust rather than the artifact of a single fortunate weight\.

Table 5:Comparison against a frontier general\-purpose LLM \(DeepSeek\-V3\.2\) on the Time\-MQA benchmark\.λ=0\.1\\lambda=0\.1and memory size512512give the best overall balance\.The two sweeps agree on a single joint configuration\. Anomaly detection, the most semantically structured understanding task, and the one the contrastive alignment should most directly benefit, reaches its peak of0\.86250\.8625at exactlyλ=0\.1\\lambda=0\.1in Table[4](https://arxiv.org/html/2606.18986#S4.T4)and at exactly memory size512512in Table[3](https://arxiv.org/html/2606.18986#S4.T3); no other setting attains this value in either sweep\. This same configuration also yields the best forecasting compliance \(FCR0\.5980\.598/0\.590\.59\), the lowest imputation own\-MSE among all swept settings \(25,21025\{,\}210, a clear margin over the next\-best∼27,000\\sim\\\!27\{,\}000–30,00030\{,\}000\), and ties for the best classification accuracy \(0\.80750\.8075\), while remaining within noise of the best value on the remaining metrics\.

### 4\.7Comparison with a Frontier General\-Purpose LLM

To situate our compact, encoder\-based model against a strong text\-only baseline, we additionally evaluate DeepSeek\-V3\.2, a frontier general\-purpose LLM that ingests the numeric series via text serialization and is prompted zero\-shot \(no time\-series encoder, no task\-specific tuning\)\. Because the two systems have very different format\-compliance rates, the shared subset here is recomputed*pairwise*over the intersection of the two models’ format\-compliant predictions \(221221samples for forecasting,288288for imputation\), and therefore differs from the all\-model shared subset in Table[2](https://arxiv.org/html/2606.18986#S4.T2)\.

Scale buys format compliance, not numeric accuracy\.DeepSeek\-V3\.2 attains near\-perfect format compliance \(FCR0\.9840\.984on forecasting,0\.910\.91on imputation\) against our0\.5980\.598and0\.7850\.785, confirming that a large instruction\-tuned model is far more reliable at emitting length\-matched sequences\. Yet once the comparison is restricted to inputs both models format correctly, this scale advantage does not translate into accuracy: on the shared subset our0\.60\.6B model already edges out DeepSeek on forecasting \(82,45882\{,\}458vs\.85,68885\{,\}688\) and is nearly4×4\\timeslower on imputation \(31,20031\{,\}200vs\.120,663120\{,\}663\)\. The same holds for imputation own\-MSE \(25,21025\{,\}210vs\.87,33487\{,\}334\), while the two are roughly comparable on forecasting own\-MSE \(296,897296\{,\}897vs\.270,979270\{,\}979, the latter measured over DeepSeek’s much larger compliant set\)\. In other words, presenting the series as continuous tokens yields more accurate numeric predictions than text serialization even against a model orders of magnitude larger\.

Discriminative time\-series understanding favors the continuous encoder\.The gap widens sharply on the tasks that require reading temporal structure rather than copying numbers\. CADE outperforms DeepSeek\-V3\.2 on anomaly detection by a wide margin \(0\.86250\.8625vs\.0\.59750\.5975\), and also on classification \(0\.80750\.8075vs\.0\.72750\.7275\) and true/false judgment \(0\.76750\.7675vs\.0\.74750\.7475\)\. A frontier text model that only sees serialized digits struggles to localize anomalies, whereas the trainable encoder exposes the underlying shape of the series\. This indicates that the principal bottleneck for general LLMs on time series is*representation*, not reasoning capacity\.

MCQ is the exception\.The one task where DeepSeek leads is multiple choice \(0\.5850\.585vs\.0\.53150\.5315\), which leans most heavily on broad reasoning and world knowledge rather than on fine\-grained reading of the series\. Here the limited capacity of the0\.60\.6B backbone is visible, and the larger model’s general competence dominates\.

### 4\.8Limitations and Future Work

Format compliance remains a bottleneck\.Although the continuous encoder markedly improves FCR over small\-model BPE serialization \(Table[2](https://arxiv.org/html/2606.18986#S4.T2)\), our compliance still trails a frontier model by a large margin \(forecasting FCR0\.5980\.598vs\.0\.9840\.984; imputation0\.7850\.785vs\.0\.910\.91\)\. Because forecasting and imputation outputs are only usable when their length matches the request, this gap directly caps the fraction of inputs on which our model produces a deployable prediction, even though its accuracy on the compliant subset is competitive or better\.

Reasoning\-heavy MCQ lags\.CADE underperforms on MCQ, the most reasoning\-intensive task, which suggests that neither the small backbone nor the current alignment signal is sufficient for multi\-option discrimination that combines temporal evidence with broader inference\.

Alignment is too implicit\.Our auxiliary one\-directional supervised contrastive loss is applied*only*to classification samples and anchors time\-series embeddings to a fixed set of class\-text vectors\. While this provides a useful regularizer for all tasks, the model is never explicitly taught what fundamental temporal concepts such as trend, periodicity, level shifts, or anomalies*mean*in language\. We hypothesize that a more principled, two\-stage curriculum would close both the FCR and MCQ gaps\. Concretely, rather than relying on a contrastive term during QA tuning, the model should first be pretrained on large\-scale time\-series – text paired data that describe these basic concepts, learning to map temporal structure onto its lexical space, and only then be fine\-tuned on the downstream QA tasks\. Such explicit concept alignment, followed by task adaptation, would give the model a genuine semantic grounding of time\-series structure instead of a narrow auxiliary signal, which we leave to future work\.

## 5Conclusion

In this work, we presented CADE \(Contrastive Alignment with Direct Embedding\), a framework for multi\-task time\-series question answering that maps each timestep directly into the LLM’s embedding space through a linear encoder and MLP projector, and aligns these embeddings with frozen class\-text anchors via a one\-directional supervised contrastive loss\. Experiments on the Time\-MQA benchmark show that CADE consistently outperforms BPE serialization and remains competitive with or better than both a pretrained foundation encoder and a frontier general\-purpose LLM across the six tasks; our ablation studies further indicate that the continuous\-token interface is the dominant driver of these gains, while the auxiliary contrastive loss contributes consistent cross\-task improvements, most notably on the understanding tasks\. Since format compliance and reasoning\-heavy questions remain the main limitations, future work will explore more explicit semantic grounding of temporal structure prior to downstream task adaptation\.

## References

- J\. Achiam, S\. Adler, S\. Agarwal, L\. Ahmad, I\. Akkaya, F\. L\. Aleman, D\. Almeida, J\. Altenschmidt, S\. Altman, S\. Anadkat,et al\.\(2023\)GPT\-4 technical report\.arXiv preprint arXiv:2303\.08774\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- A\. F\. Ansari, L\. Stella, A\. C\. Turkmen, X\. Zhang, P\. Mercado, H\. Shen, O\. Shchur, S\. S\. Rangapuram, S\. P\. Arango, S\. Kapoor,et al\.\(2024\)Chronos: learning the language of time series\.Transactions on Machine Learning Research2024\.Cited by:[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1)\.
- Z\. Chen, X\. Zhang, and M\. Zhu \(2025\)TS\-clip: time series understanding by clip\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 4646–4664\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- W\. Dai, J\. Li, D\. Li, A\. Tiong, J\. Zhao, W\. Wang, B\. Li, P\. N\. Fung, and S\. Hoi \(2023\)Instructblip: towards general\-purpose vision\-language models with instruction tuning\.Advances in neural information processing systems36,pp\. 49250–49267\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- A\. Das, W\. Kong, R\. Sen, and Y\. Zhou \(2024\)A decoder\-only foundation model for time\-series forecasting\.InInternational Conference on Machine Learning,pp\. 10148–10167\.Cited by:[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1)\.
- S\. Dong, W\. Fan, T\. Wu, and Y\. Fu \(2025\)Teaching time series to see and speak: forecasting with aligned visual and textual perspectives\.arXiv preprint arXiv:2506\.24124\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- N\. Gruver, M\. Finzi, S\. Qiu, and A\. G\. Wilson \(2023\)Large language models are zero\-shot time series forecasters\.Advances in neural information processing systems36,pp\. 19622–19635\.Cited by:[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1)\.
- K\. He, H\. Fan, Y\. Wu, S\. Xie, and R\. Girshick \(2020\)Momentum contrast for unsupervised visual representation learning\.InProceedings of the IEEE/CVF conference on computer vision and pattern recognition,pp\. 9729–9738\.Cited by:[§3\.4](https://arxiv.org/html/2606.18986#S3.SS4.p3.9)\.
- M\. Jin, S\. Wang, L\. Ma, Z\. Chu, J\. Zhang, X\. Shi, P\. Chen, Y\. Liang, Y\. Li, S\. Pan,et al\.\(2024\)Time\-llm: time series forecasting by reprogramming large language models\.InInternational conference on learning representations,pp\. 23857–23880\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1),[§1](https://arxiv.org/html/2606.18986#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1),[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- P\. Khosla, P\. Teterwak, C\. Wang, A\. Sarna, Y\. Tian, P\. Isola, A\. Maschinot, C\. Liu, and D\. Krishnan \(2020\)Supervised contrastive learning\.Advances in neural information processing systems33,pp\. 18661–18673\.Cited by:[§3\.4](https://arxiv.org/html/2606.18986#S3.SS4.p6.7)\.
- Y\. Kong, Y\. Yang, Y\. Hwang, W\. Du, S\. Zohren, Z\. Wang, M\. Jin, and Q\. Wen \(2025\)Time\-mqa: time series multi\-task question answering with context enhancement\.InProceedings of the 63rd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 29736–29753\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p1.1),[§4\.1](https://arxiv.org/html/2606.18986#S4.SS1.p1.1),[§4\.2](https://arxiv.org/html/2606.18986#S4.SS2.p2.1)\.
- J\. Li, D\. Li, S\. Savarese, and S\. Hoi \(2023\)Blip\-2: bootstrapping language\-image pre\-training with frozen image encoders and large language models\.InInternational conference on machine learning,pp\. 19730–19742\.Cited by:[§4\.2](https://arxiv.org/html/2606.18986#S4.SS2.p4.1)\.
- A\. Liu, B\. Feng, B\. Xue, B\. Wang, B\. Wu, C\. Lu, C\. Zhao, C\. Deng, C\. Zhang, C\. Ruan,et al\.\(2024a\)Deepseek\-v3 technical report\.arXiv preprint arXiv:2412\.19437\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- C\. Liu, H\. Miao, Q\. Xu, S\. Zhou, C\. Long, Y\. Zhao, Z\. Li, and R\. Zhao \(2025a\)Efficient multivariate time series forecasting via calibrated language models with privileged knowledge distillation\.In2025 IEEE 41st International Conference on Data Engineering \(ICDE\),pp\. 3165–3178\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- C\. Liu, S\. Zhou, Q\. Xu, H\. Miao, C\. Long, Z\. Li, and R\. Zhao \(2025b\)Towards cross\-modality modeling for time series analytics: a survey in the llm era\.InProceedings of the Thirty\-Fourth International Joint Conference on Artificial Intelligence,pp\. 10564–10572\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- H\. Liu, C\. Li, Q\. Wu, and Y\. J\. Lee \(2023\)Visual instruction tuning\.Advances in neural information processing systems36,pp\. 34892–34916\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1),[§3\.3](https://arxiv.org/html/2606.18986#S3.SS3.p2.3),[§4\.2](https://arxiv.org/html/2606.18986#S4.SS2.p5.1)\.
- Q\. Liu, X\. Liu, C\. Liu, Q\. Wen, and Y\. Liang \(2024b\)Time\-ffm: towards lm\-empowered federated foundation model for time series forecasting\.Advances in Neural Information Processing Systems37,pp\. 94512–94538\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- X\. Liu, J\. Hu, Y\. Li, S\. Diao, Y\. Liang, B\. Hooi, and R\. Zimmermann \(2024c\)Unitime: a language\-empowered unified model for cross\-domain time series forecasting\.InProceedings of the ACM Web Conference 2024,pp\. 4095–4106\.Cited by:[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1)\.
- Y\. Nie, N\. H\. Nguyen, P\. Sinthong, and J\. Kalagnanam \(2023\)A time series is worth 64 words: long\-term forecasting with transformers\.InThe Eleventh International Conference on Learning Representations,Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- R\. Sennrich, B\. Haddow, and A\. Birch \(2016\)Neural machine translation of rare words with subword units\.InProceedings of the 54th annual meeting of the association for computational linguistics \(volume 1: long papers\),pp\. 1715–1725\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p2.1)\.
- X\. Shi, S\. Wang, Y\. Nie, D\. Li, Z\. Ye, Q\. Wen, and M\. Jin \(2025\)Time\-moe: billion\-scale time series foundation models with mixture of experts\.InInternational conference on learning representations,pp\. 34635–34667\.Cited by:[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1),[§3\.3](https://arxiv.org/html/2606.18986#S3.SS3.p3.1),[§4\.2](https://arxiv.org/html/2606.18986#S4.SS2.p4.1),[§4\.2](https://arxiv.org/html/2606.18986#S4.SS2.p5.1)\.
- C\. Sun, H\. Li, Y\. Li, and S\. Hong \(2024\)TEST: text prototype aligned embedding to activate LLM’s ability for time series\.InThe Twelfth International Conference on Learning Representations,Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1),[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p3.1)\.
- C\. Wang, Q\. Qi, J\. Wang, H\. Sun, Z\. Zhuang, J\. Wu, L\. Zhang, and J\. Liao \(2025a\)Chattime: a unified multimodal time series foundation model bridging numerical and textual data\.InProceedings of the AAAI Conference on Artificial Intelligence,pp\. 12694–12702\.Cited by:[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p1.1)\.
- Y\. Wang, P\. Lei, J\. Song, Y\. Hao, T\. Chen, Y\. Zhang, L\. Jia, Y\. Li, and Z\. Wei \(2025b\)ITFormer: bridging time series and natural language for multi\-modal qa with large\-scale multitask dataset\.InInternational Conference on Machine Learning,pp\. 63324–63344\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p3.1),[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p1.1),[§4\.2](https://arxiv.org/html/2606.18986#S4.SS2.p4.1)\.
- Q\. Wen, T\. Zhou, C\. Zhang, W\. Chen, Z\. Ma, J\. Yan, and L\. Sun \(2023\)Transformers in time series: a survey\.InProceedings of the Thirty\-Second International Joint Conference on Artificial Intelligence,pp\. 6778–6786\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- H\. Wu, T\. Hu, Y\. Liu, H\. Zhou, J\. Wang, and M\. Long \(2023\)TimesNet: temporal 2d\-variation modeling for general time series analysis\.InThe Eleventh International Conference on Learning Representations,Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- Z\. Xie, Z\. Li, X\. He, L\. Xu, X\. Wen, T\. Zhang, J\. Chen, R\. Shi, and D\. Pei \(2025\)ChatTS: aligning time series with llms via synthetic data for enhanced understanding and reasoning\.Proceedings of the VLDB Endowment18,pp\. 2385–2398\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p3.1),[§2\.2](https://arxiv.org/html/2606.18986#S2.SS2.p1.1)\.
- H\. Xue and F\. D\. Salim \(2023\)Promptcast: a new prompt\-based learning paradigm for time series forecasting\.IEEE Transactions on Knowledge and Data Engineering36,pp\. 6851–6864\.Cited by:[§2\.1](https://arxiv.org/html/2606.18986#S2.SS1.p1.1)\.
- A\. Yang, A\. Li, B\. Yang, B\. Zhang, B\. Hui, B\. Zheng, B\. Yu, C\. Gao, C\. Huang, C\. Lv,et al\.\(2025\)Qwen3 technical report\.arXiv preprint arXiv:2505\.09388\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- A\. Zeng, M\. Chen, L\. Zhang, and Q\. Xu \(2023\)Are transformers effective for time series forecasting?\.InProceedings of the AAAI conference on artificial intelligence,pp\. 11121–11128\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.
- T\. Zhou, P\. Niu, L\. Sun, R\. Jin,et al\.\(2023\)One fits all: power general time series analysis by pretrained lm\.Advances in neural information processing systems36,pp\. 43322–43355\.Cited by:[§1](https://arxiv.org/html/2606.18986#S1.p1.1)\.

Similar Articles