Time-MQA: Time Series Multi-Task Question Answering with Context Enhancement

Yaxuan Kong, Yiyuan Yang, Yoontae Hwang, Wenjie Du, Stefan Zohren, Zhangyang Wang, Ming Jin, Qingsong Wen

Introduction

Time series analysis has historically operated in isolation, focusing on specific numerical outputs like forecasts or anomaly scores without providing underlying reasoning. These "black box" models often fail to incorporate vital contextual metadata—such as the environment or intent behind the data—which can drastically change the interpretation of a signal. Time-MQA addresses this gap by integrating time series analysis with natural language reasoning, allowing users to query temporal data using intuitive language.

The Time-MQA Framework

The Time-MQA framework treats diverse time series tasks as a unified Question Answering (QA) problem. It processes three primary inputs: raw numerical observations ($X$), textual contextual information ($C$), and a natural language question ($Q$).

Overview of the Time-MQA framework illustrating the interaction between time series data, contextual metadata, and natural language queries.

To implement this, the researchers performed continual pre-training on open-source Large Language Models (LLMs), including Mistral-7B, Llama-3-8B, and Qwen-2.5-7B. By utilizing Parameter-Efficient Fine-Tuning (PEFT) with LoRA adapters, the models learn to interpret the specific "language" of time series data without the need to retrain massive models from scratch.

The TSQA Dataset

A central contribution of this work is the TSQA dataset, comprising approximately 200,000 question-answer pairs. This dataset spans 12 domains—including healthcare, finance, energy, and traffic—and covers five distinct tasks:

  • Forecasting: Predicting future values.
  • Imputation: Filling in missing data points.
  • Anomaly Detection: Identifying outliers or failures.
  • Classification: Categorizing data patterns.
  • Open-Ended Reasoning: Explaining the "why" behind the data.

Unlike previous benchmarks, TSQA emphasizes "Context Enhancement," providing textual descriptions that help the model resolve ambiguities inherent in raw numerical data. The data is derived from a mix of classic public datasets (like ETTh and WISDM) and synthetic data, with reasoning pairs generated via GPT-4o and manually verified by humans.

Key Results and Insights

The study demonstrates that fine-tuned LLMs can outperform general-purpose models like GPT-4o in specialized time-series tasks. For instance, Mistral-7B achieved a Mean Squared Error (MSE) of 1.35 in forecasting, compared to GPT-4o’s 1.79. In judgment-based tasks (True/False questions about data patterns), Qwen-2.5 7B reached an accuracy of 82%.

Beyond numerical precision, the framework enables "cognitive tasks," such as identifying structural breaks and summarizing trends in plain English. A user preference study involving 78 participants revealed a 70.5% preference for Mistral-7B, largely due to its superior explanation clarity and its ability to provide logical, easy-to-understand justifications for its answers.

Conclusion and Future Directions

While Time-MQA represents a significant advancement, several challenges remain. Current models may struggle with highly irregular real-world data and are prone to "hallucinations" when processing extremely long numerical sequences. Additionally, the computational cost of fine-tuning 7B+ parameter models remains high.

Future research will focus on expanding the TSQA dataset to include dynamic, real-world data streams and developing more efficient numerical encoding methods to improve the high-precision mathematical capabilities of LLMs.

Summary updated

BibTeX
@inproceedings{kong2025time,
  author = {Yaxuan Kong and Yiyuan Yang and Yoontae Hwang and Wenjie Du and Stefan Zohren and Zhangyang Wang and Ming Jin and Qingsong Wen},
  title = {{Time-MQA: Time Series Multi-Task Question Answering with Context Enhancement}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure