Causal augmented large model fine-tuning method for multi-source time series data reasoning
By combining causal discovery and reinforcement learning, this approach addresses the issues of lack of causal knowledge and unreliable reasoning processes in multi-source time-series data reasoning using large language models, achieving high-quality, interpretable reasoning output.
Patent Information
- Application Number
- CN202611265539.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-24
AI Technical Summary
Existing large language models lack explicit causal knowledge constraints when processing multi-source time-series data, which can lead to illusions during the reasoning process, make it difficult to effectively utilize the causal relationships between variables, and lack fine-grained quality control during the fine-tuning process, resulting in insufficient credibility and interpretability of the reasoning results.
Causal knowledge is mined from multi-source time-series data using causal discovery algorithms. Hint word-label pairs containing causal knowledge are constructed, and candidate responses generated by a teacher model for structured reasoning are used for supervised fine-tuning. Combined with reinforcement learning fine-tuning, reward mechanisms for answer correctness, format accuracy, and causal logic consistency are introduced to optimize the model's reasoning process.
Explicitly embedding causal knowledge constraints improves the credibility and interpretability of the model's reasoning, enhances the utilization of causal relationships in multivariate time-series data, and achieves high-quality reasoning output.
Smart Images

Figure CN123159462A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, specifically to the field of large model fine-tuning technology, and more specifically, to a method for fine-tuning causal augmentation large models for reasoning with multi-source time-series data. Background Technology
[0002] Existing time-series reasoning methods based on Large Language Models (LLMs) mainly fall into four categories: text-based methods, multimodal vision-based methods, agent-based methods, and multimodal time-series-based methods. The first three types of methods primarily provide time-series data to the LLM through substitution, enabling it to perform preliminary understanding and reasoning about the attributes of the time series. The fourth type of method, however, truly integrates time-series data as a separate modality with the LLM, thereby completing the analysis and understanding of the time-series data.
[0003] (1) Text-based methods: Text-based methods directly encode time series values into the LLM in the form of raw text. However, these methods are limited by the length of the prompt words, making it difficult to perform global analysis. Moreover, the text encoding method itself is difficult to efficiently represent high-frequency, long-cycle physiological signal data, which often leads to an incomplete understanding of the data context and limits the model's ability to grasp global health trends.
[0004] (2) Multimodal vision-based methods: Multimodal vision-based methods visualize time series (e.g., time series charts) and input them into visual multimodal LLM in the form of images. These methods have difficulty in accurately capturing fine-grained information in time series, resulting in low accuracy in data-intensive tasks, and the methods have high computational overhead.
[0005] (3) Agent-based methods: Agent-based methods employ a "reasoning-action" strategy, breaking down complex time series analysis tasks into a series of alternating thinking, observation, and operational steps performed by external tools. While this approach is theoretically more flexible, its practical effectiveness heavily relies on the injection of domain expert knowledge and the reliability of external tools; it also suffers from high computational overhead and lengthy inference time. Especially when processing multivariate time series data, it often requires generating lengthy token sequences to support the entire inference chain. More seriously, as the inference chain lengthens, the risk of the model generating illusions increases significantly, thereby greatly weakening its credibility and stability in complex time series analysis tasks.
[0006] (4) Multimodal Time Series-Based Methods: A representative algorithm based on multimodal time series is ChatTS (ChatTS: Aligning Time Series with LLMs via Synthetic Data for Enhanced Understanding and Reasoning). This work systematically constructs an LLM fine-tuning framework for time series understanding and reasoning for the first time, aiming to bridge the gap between general LLMs and specialized time series analysis tasks. Unlike the previous indirect paradigm of simply encoding time series into text or images, ChatTS has carried out a collaborative design from three levels: data generation, instruction construction, and model architecture. First, in terms of training data construction, ChatTS proposes a time series generator based on attribute combination. By defining dozens of seed attributes in four categories—trend, seasonality, noise, and fluctuation—and combining real-world indicator names (such as "heart rate variability" and "blood glucose fluctuation") to enhance the realism of the scene, it can programmatically generate diverse univariate and multivariate time series with accurate semantic annotations. Building upon this foundation, the authors further developed the TSEvol-Instruct method. Drawing inspiration from Evol-Instruct, it iteratively evolves the initial question-answer pairs across four dimensions: depth, breadth, reasoning, and contextualization. This constructs a high-quality instruction fine-tuning dataset covering higher-order cognitive tasks such as recognition, induction, reasoning, and comparative analysis. Secondly, in terms of model architecture, ChatTS is based on Qwen2.5-14B-Instruct, introducing a value-preserving temporal normalization strategy. This compresses the dynamic range while retaining key numerical features, thereby enhancing the model's ability to perceive fine-grained patterns such as peaks, periods, and abrupt changes. The entire training process consists of two stages: first, temporal-text alignment pre-training; then, enhanced fine-tuning using SFT data generated by TSEvol, and mixing in some general instruction data to alleviate overfitting. Finally, regarding the evaluation system, ChatTS constructs a two-dimensional evaluation benchmark covering alignment tasks (such as trend recognition, perturbation detection, and multivariate association classification) and reasoning tasks (such as true / false judgment, causal inference, and cross-sequence comparison). It includes real-world collected data, synthetic controllable data, and the open-source MCQ2 dataset, and uses F1 score and relative accuracy as comprehensive metrics. Experiments show that ChatTS significantly outperforms existing methods based on pure text, vision, or agents on multiple tasks, especially demonstrating stronger robustness and interpretability in complex reasoning scenarios requiring numerical sensitivity and logical coherence.However, its application still faces obvious limitations: the current version of ChatTS only supports basic feature analysis of time series data and does not yet have the ability to process complex classification tasks; more importantly, due to the lack of native support from mainstream industrial-grade reinforcement learning frameworks, ChatTS's RL fine-tuning process needs to rely on customized implementation, resulting in a cumbersome training process, low training efficiency, and high consumption of computing resources.
[0007] Existing temporal reasoning techniques mainly suffer from two problems:
[0008] First, the reasoning process of existing large-scale models for time-series data lacks explicit logical constraints, resulting in a lack of reliability in their outputs. While LLMs possess powerful generative capabilities, their reasoning process often exhibits "black box" characteristics, easily generating seemingly reasonable but actually erroneous "illusions." For example, in the screening and assessment of cognitive impairment, doctors not only need a classification result of "whether or not they have the disease," but also need to understand the basis behind the judgment. However, existing methods struggle to provide a causal evidence chain that conforms to clinical pathological logic while outputting results. This "lack of interpretability" severely hinders the practical application of this technology in clinical auxiliary diagnostic scenarios.
[0009] Second, when dealing with multivariate time-series data, it is difficult to effectively utilize the causal relationships between variables to guide inference, resulting in insufficient reliability of the inference chain. Taking health monitoring scenarios as an example, when the model infers the user's fatigue level, if it can explicitly utilize the causal knowledge that "increased exercise leads to increased heart rate, which in turn affects fatigue level," the interpretability and reliability of the inference will be significantly improved.
[0010] Third, the lack of fine-grained quality control during the fine-tuning process leads to a need to improve the quality of the later inference results.
[0011] It should be noted that the background information presented here is only for illustrating relevant information about the present invention to aid in understanding the technical solution of the present invention, and does not imply that the relevant information is necessarily prior art. The relevant information was submitted and disclosed together with the present invention, and should not be considered prior art unless there is evidence that the relevant information was disclosed before the filing date of the present invention. Summary of the Invention
[0012] Therefore, the purpose of this invention is to overcome the shortcomings of the prior art and provide a method for fine-tuning a causal enhancement large model.
[0013] The objective of this invention is achieved through the following technical solution:
[0014] According to a first aspect of the present invention, a method for fine-tuning a causal reinforcement model is provided, comprising: Step S1: acquiring a multi-source time-series dataset collected by monitoring human state, mining causal knowledge between time-series variables from different sources in the dataset using a causal discovery algorithm, and constructing multiple cue word-label pairs containing causal knowledge, wherein the labels are numerical or categorical true answers to the task; Step S2: selecting a portion of samples from the multiple cue word-label pairs, having a teacher model reason about the cue words of the selected samples to generate candidate responses containing a structured reasoning process, filtering the candidate responses for data quality to obtain teacher thought chain responses, using the teacher thought chain responses and their corresponding cue words as supervised fine-tuning samples, and performing supervised fine-tuning on the large model as the student to obtain a supervised fine-tuned large model; Step S3: based on the remaining samples in the multiple cue word-label pairs, using a group relative strategy optimization algorithm to perform reinforcement learning fine-tuning on the supervised fine-tuned large model to obtain a reinforcement learning fine-tuned large model, wherein a multi-dimensional reward mechanism including answer correctness reward, format accuracy reward, and causal logic consistency reward is used to guide the fine-tuning process of the large model during reinforcement learning. This scheme can achieve at least the following beneficial technical effects: Addressing the problems of lacking explicit causal knowledge constraints and difficulty in effectively utilizing causal relationships between variables to guide reasoning, in step S1, this invention utilizes a causal discovery algorithm to mine causal knowledge between different source time-series variables in a multi-source time-series dataset, and constructs cue word-label pairs containing causal knowledge, explicitly embedding causal relationships into the model input side to provide prior constraints for subsequent reasoning; simultaneously, in the reinforcement learning fine-tuning stage of step S3, a causal logic consistency reward is introduced to directly constrain the consistency between the model-generated thought chain and causal knowledge, thereby effectively suppressing reasoning illusions and logical fallacies. To address the lack of fine-grained quality control in the reasoning process, this invention, in step S2, generates candidate responses containing structured reasoning processes from the teacher model, and obtains teacher thought chain responses through data quality filtering, thereby constructing supervised fine-tuning samples. This allows the model to learn standardized reasoning formats and high-quality reasoning patterns during the initial training phase. In step S3, a group relative strategy optimization algorithm is adopted, and a multi-dimensional reward mechanism including reward for correct answer, reward for format accuracy, and reward for causal logic consistency is used. This collaboratively constrains the model output from three complementary dimensions: result correctness, structural standardization, and causal logic consistency, achieving fine-grained quality control of the reasoning process.
[0015] Optionally, step S1 includes: S11: using a causal discovery algorithm to mine causal knowledge between time-series variables from different sources in the multi-source time-series dataset to obtain causal relationships, and constructing a causal graph based on the causal relationships, wherein nodes represent time-series variables and edges represent causal relationships between nodes; S12: encoding the direct and indirect causal relationships in the causal graph into causal descriptions in natural language form; S13: constructing prompt words based on the causal descriptions and the time-series data of samples in the multi-source time-series dataset, wherein the prompt words include task description, background information, time-series data, causal description, and output format requirements for the answer, wherein the time-series data in the prompt words is a comma-separated text string encoded from numerical sequences, and the output format requirements include: output in JSON format, output including inference process fields and answer fields; S14: combining the prompt words with the labels of the corresponding samples to obtain the prompt word-label pairs. This scheme can achieve at least the following beneficial technical effects: by encoding causal graphs into natural language and constructing prompt words, it realizes the structured injection of causal knowledge into the input side of a large language model; by encoding numerical sequences into comma-separated text strings, it adapts continuous time-series data to the text input paradigm of a large language model; and by pre-setting JSON output format requirements in the prompt words, it provides a unified structural foundation for subsequent automated parsing, reward calculation, and result extraction.
[0016] Optionally, step S12 includes: for each causal edge in the causal graph, generating a natural language description to characterize that a change in the source variable of the causal edge leads to a change in the target variable; for indirect causal paths in the causal graph, generating a natural language description containing transitivity constraints to characterize that if the source variable affects the intermediate variable and the intermediate variable affects the target variable, then the source variable will indirectly affect the target variable. This scheme can achieve at least the following beneficial technical effects: by encoding each direct causal edge and each indirect causal path in the causal graph with natural language, full coverage injection of causal knowledge is achieved; by encoding transitivity constraints on indirect causal paths, the model can use indirect causal relationships between variables for reasoning, expanding the depth and breadth of causal reasoning and reducing the one-sidedness of reasoning caused by the omission of indirect causes.
[0017] Optionally, step S2 includes: S21: The teacher model infers from the prompts of the selected samples to generate candidate responses containing a structured reasoning process; S22: Data quality filtering is performed on the candidate responses, including: answer correctness filtering to retain the part of the candidate responses where the predicted answer is consistent with the true label, obtaining a preliminary filtering result; and logical correctness filtering to retain the part of the reasoning process in the preliminary filtering result that conforms to the causal relationship consistency constraint according to the causal graph, obtaining the teacher's thought chain response; S23: The teacher's thought chain response and its corresponding prompts are used as supervised fine-tuning samples to supervise the fine-tuning of the large model, which acts as the student, to obtain the large model after supervised fine-tuning. This scheme can achieve at least the following beneficial technical effects: the quality of the supervised fine-tuning training samples is improved through the dual filtering mechanism of answer correctness filtering and logical correctness filtering; by introducing causal relationship consistency constraints in logical correctness filtering, causal verification of the reasoning process is achieved in the supervised fine-tuning stage, so that the data entering the training satisfies causal logical self-consistency while ensuring the accuracy of the answers, thereby improving the reliability and causal awareness of the large model's learning process.
[0018] Optionally, the logical correctness filtering includes the following multi-dimensional evaluations: internal consistency evaluation, used to determine whether the reasoning steps are coherent and can logically derive the correct conclusion; terminology overlap evaluation, used to evaluate whether the terms used in the reasoning process are consistent with the terms in the given context; number of reasoning steps evaluation, used to confirm whether the reasoning contains more than N preset steps; logical consistency evaluation, used to verify whether the relationship between the time-series data described in the reasoning is consistent with the causal relationship provided in the given context; content diversity evaluation, used to check whether the reasoning process avoids unnecessary repetition and provides diverse and meaningful steps; task domain relevance evaluation, used to verify whether the reasoning is strictly based on time-series data and focuses on the task domain described in the task description; and task instruction relevance evaluation, used to determine whether the reasoning strictly follows the task instructions and the given context; wherein, the logical correctness filtering only retains candidate responses where the evaluation result for each dimension in the multi-dimensional evaluation is "yes". This scheme can achieve at least the following beneficial technical effects: by using a seven-dimensional reasoning quality assessment framework, candidate responses are comprehensively evaluated from multiple dimensions, including internal consistency, terminology overlap, reasoning step completeness, logical consistency, content diversity, task domain relevance, and task instruction relevance; by retaining only the strict filtering standard that scores full marks in each dimension, the quality ceiling of supervised fine-tuning samples is significantly improved, thereby enabling the model to learn higher quality reasoning patterns.
[0019] Optional, total reward value during reinforcement learning for:
[0020]
[0021] in, Rewards for correct answers, Rewards are given for format accuracy. Rewards are given for consistency of causal logic. The weighted coefficient for the reward based on the correctness of the answer. The weighting factor for the format accuracy bonus. The weighted coefficient for the causal logical consistency reward represents the degree of matching between the relationships between time-series data described in the thought chain generated by the large model and the causal relationships provided in the prompts. This scheme can achieve at least the following beneficial technical effects: through a three-dimensional weighted reward mechanism of answer correctness, format accuracy, and causal logical consistency, it achieves synergistic optimization of the model output in terms of result correctness, structural standardization, and causal logical self-consistency; by directly quantifying the degree of matching between the thought chain and causal knowledge through the causal logical consistency reward, it effectively suppresses illusions and logical fallacies in the reasoning process, and enhances the interpretability and credibility of the model output.
[0022] According to a second aspect of the present invention, a method for prediction based on multi-source time-series data is provided. The method includes: acquiring multi-source time-series data to be processed collected from monitoring the state of a human being under test; constructing input prompts containing causal knowledge based on the multi-source time-series data to be processed, wherein the input prompts include task description, background information, time-series data, causal description, and output format requirements for the answer; inputting the input prompts into a large model that has been supervised and fine-tuned as described in the first aspect; acquiring a predicted response containing a structured reasoning process output by the large model; and extracting the final answer from the predicted response. This solution can achieve at least the following beneficial technical effects: by directly applying the causal-injected prompts constructed during the training phase to the time-series data to be tested, consistency in the utilization of causal knowledge during the training and inference phases is achieved; the prediction result is accompanied by an interpretable reasoning process through structured reasoning output; and the final answer is extracted from the structured response, achieving efficient and reliable acquisition from multi-source time-series data to the prediction result.
[0023] According to a third aspect of the present invention, a computer device / apparatus / system is provided, including a memory, a processor, and a computer program / instructions stored in the memory, wherein the processor executes the computer program / instructions to implement the steps of the method described in the first or second aspect.
[0024] According to a fourth aspect of the present invention, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first or second aspect. Attached Figure Description
[0025] The embodiments of the present invention will be further described below with reference to the accompanying drawings, wherein:
[0026] Figure 1 This is a flowchart illustrating the causal enhancement large model fine-tuning method according to an embodiment of the present invention;
[0027] Figure 2 This is a detailed flowchart illustrating the fine-tuning method for causal enhancement large model according to an embodiment of the present invention.
[0028] Figure 3 This is a schematic diagram of reasoning quality assessment prompts according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the causal logic consistency reward evaluation prompt words according to an embodiment of the present invention;
[0030] Figure 5 This is a schematic diagram of text readability scoring prompts according to an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of logical consistency scoring prompts according to an embodiment of the present invention;
[0032] Figure 7 This is a schematic diagram of reasoning comprehensiveness scoring prompts according to an embodiment of the present invention;
[0033] Figure 8 This is a schematic diagram comparing the QWK values of different models in the experiment according to the present invention with human ratings;
[0034] Figure 9 This is a schematic diagram of the change curve of reinforcement learning training reward value with and without cold start according to the present invention.
[0035] Figure 10 This is a schematic diagram illustrating the model inference quality evaluation results for different fine-tuning strategies on various datasets in the experiment according to the present invention;
[0036] Figure 11 This is a schematic diagram illustrating the changing trends of model performance and inference quality under different time windows in the experiment according to the present invention;
[0037] Figure 12 A schematic diagram illustrating an example of an experiment according to the present invention;
[0038] Figure 13 This is a schematic diagram comparing the inference results of each model in the experiment according to the present invention on a sample of the PMData dataset.
[0039] Figure 14 This is a schematic diagram of an inference example of CauTimeLLM-R1 in a time-series classification task according to the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0041] As mentioned in the background section, existing technologies mainly suffer from the following three problems: First, large language models lack the logical constraints of explicit causal knowledge when processing multi-source time-series data, which can easily lead to illusions that violate causal logic during the reasoning process; second, when faced with multi-variable time-series data, it is difficult to effectively utilize the causal relationships between variables to guide reasoning, resulting in insufficient reliability of the reasoning chain; and third, the fine-tuning process lacks fine-grained quality control, which means that the quality of the later reasoning results needs to be improved.
[0042] To address the aforementioned problems, this invention provides a causal reinforcement large model fine-tuning method, aiming to improve upon the shortcomings of existing methods. Building upon existing large model fine-tuning algorithms for time-series data reasoning, this invention proposes a reinforcement learning fine-tuning method that integrates causal priors and logical consistency constraints, thereby enhancing the reasoning capabilities of time-series large models. In this invention, we propose a causal reinforcement large model fine-tuning method for multi-source time-series data reasoning. This method mainly consists of three stages: First, a causal discovery algorithm is used to mine the causal structure between variables from the observed data, explicitly encoding causal knowledge into natural language descriptions and injecting prompt words. Second, supervised fine-tuning (SFT) is performed using teacher-guided knowledge distillation technology to achieve a cold start in task capability, enabling the large model to initially possess the basic ability to reason according to causal logic. Finally, a multi-dimensional reward mechanism integrating answer correctness, format accuracy, and causal logical consistency is designed, and a group relative strategy optimization algorithm is used to further reinforce the fine-tuned large model through reinforcement learning. This stage further optimizes the reasoning quality through multi-dimensional fine-grained reward feedback, thereby generating high-confidence reasoning results with more standardized formats, more accurate judgments, and more self-consistent causal logic.
[0043] To better illustrate this invention, the following sections will introduce the overall scheme overview, problem definition, dataset construction and causal injection, supervised fine-tuning stage, reinforcement learning fine-tuning stage, inference application, and experimental verification.
[0044] I. Overall Plan Overview
[0045] According to one embodiment of the present invention, the object of the present invention is to solve the problems of the prior art's reasoning process lacking verifiability constraints and failing to effectively utilize the causal relationships between multiple variables to guide reasoning. See also... Figure 1This paper provides a causal enhancement LLM fine-tuning method, or a causal enhancement LLM fine-tuning method for multi-source time series reasoning (CauTimeLLM-R1), which includes steps S1, S2, and S3.
[0046] In simple terms, this fine-tuning method mainly includes three core stages (such as...) Figure 2 As shown in the diagram): the first stage is dataset construction and causal injection (corresponding to step S1), the second stage is SFT cold start training (corresponding to step S2), and the third stage is reinforcement learning fine-tuning (corresponding to step S3). The problem definition is given first, then each step of CauTimeLLM-R1 training is described in detail, and finally the effectiveness of the method is verified on multiple datasets.
[0047] II. Problem Definition
[0048] Given a by A multi-source time series dataset (i.e., a multi-source time series dataset) consists of multiple sources. Each source k contains a multivariate time series of length L. :
[0049]
[0050] in, Representative source In time Included Time series variables ( Time series data Write prompt words in natural language In this model, the goal is to target the prompt words. Chinese time series data The question outputs the correct answer and provides the corresponding reasoning process.
[0051] III. Dataset Construction and Causal Injection
[0052] For a given time series dataset First, construct prompt word (question)-tag pairs that contain causal knowledge. , among which, tags It records the actual numerical answers for prediction or classification tasks to support subsequent training of the model's inference capabilities.
[0053] According to one embodiment of the present invention, step S1 includes sub-steps S11-S14. Wherein:
[0054] S11: The causal discovery algorithm is used to mine causal knowledge between time series variables from different sources in the multi-source time series dataset to obtain causal relationships, and a causal graph is constructed based on the causal relationships, where nodes represent time series variables and edges represent causal relationships between nodes.
[0055] According to one embodiment of the present invention, in order to inject causal knowledge, a causal discovery algorithm is first used to calculate the causal relationships between time-series variables from different sources, learn the causal relationships (causal structure) between variables from the observation data, and construct a causal graph. , where nodes Corresponding time series variables, edge This indicates a causal relationship between variables. For example, in a physiological state monitoring scenario, different sources refer to time-series variables from different sensors or data modalities, such as heart rate and blood pressure; in an EEG signal recognition scenario, different sources refer to time-series variables collected by electrode channels distributed in different brain regions.
[0056] S12: Encode the direct and indirect causal relationships in the causal graph into causal descriptions in natural language form.
[0057] According to an embodiment of the present invention, a cause-effect graph Causal descriptions can be structured and encoded into text form in the following ways. :
[0058]
[0059] in, This indicates that the time series variables and time series variables Convert the causal edges into text in natural language form. This represents the causal relationship between variables. It is schematic, for each causal edge... Generate natural language descriptions :"variable Changes in variables "Changes". In addition to the direct causal relationships corresponding to directly connected edges, the method of this invention also encodes transitivity constraints for indirect causal relationships (chain-like causal paths): one variable indirectly affects another variable. For example, "If..." Influence and Influence ,but It will also indirectly affect ".
[0060] S13: Construct prompt words based on the causal description and the time series data of the samples in the multi-source time series dataset. The prompt words include task description, background information, time series data, causal description, and output format requirements for the answer. The time series data in the prompt words is a comma-separated text string encoded from a numerical sequence. The output format requirements include: output in JSON format, output including inference process field and answer field.
[0061] According to one embodiment of the present invention, based on the mined causal knowledge, input prompt words are further constructed using structured templates. It includes the following components:
[0062]
[0063] in, The concatenation is indicated by the task description defining the inference objective, such as ranking prediction or time series classification; the background information provides domain context information, including classification or prediction criteria, user profiles, and time information; the time series data is the numerical sequence (time series data sequence) encoded into a text description, represented in string format. And separate different time series values of the same variable with commas; causal description The model should describe the causal relationships (causal association structure) between variables in natural language. The output format should be standardized to JSON format, including a "Thought" field and an "Answer" field. The "Thought" field includes basic data analysis and reasoning, plus a causal verification section to ensure consistency between the data analysis and the causal knowledge in the context, reducing logical fallacies and illusions. The "Answer" field includes a data summary, the reasoning process, and the final answer, ensuring the model's output is parsable and extractable. It's important to note that data analysis involves processing and interpreting the raw time-series data line by line, a procedural action; the data summary is a generalization of all data analysis results, a conclusive statement. The reasoning content represents the model's intermediate derivations, reflecting its thought process; the reasoning process is a user-oriented structured reasoning argument, organizing the thought process into a clear causal chain.
[0064] S14: Combine the prompt word with the corresponding sample label to obtain the prompt word-label pair.
[0065] According to one embodiment of the present invention, after constructing the prompt words for each sample according to the template, the prompt words corresponding to each sample can be... and tags Combining prompt words and tag pairs .
[0066] IV. Monitoring and Fine-tuning Phase (Training Phase 1)
[0067] After constructing the cue word-label pairs containing causal knowledge, the SFT pairs are first used as the student's large model (also known as the base model or basic large model for distinction) for cold start training, enabling it to understand the format of time series data and generate responses that meet the requirements. This stage (step S2) mainly employs knowledge distillation fine-tuning, see again... Figure 2 The process consists of three steps: generating the CoT of the teacher model, filtering data quality, and performing SFT cold start training.
[0068] According to one embodiment of the present invention, step S2 includes: S21 (corresponding to CoT generation of the teacher model), S22 (corresponding to data quality filtering), and S23 (corresponding to SFT cold start training). Wherein:
[0069] S21: The teacher model infers from the prompts of the selected samples to generate candidate responses that include a structured reasoning process.
[0070] According to one embodiment of the present invention, in order to generate high-quality SFT training data, a teacher model with strong inference capabilities is first used. (For example, see) Figure 2 DeepSeek-V3.2 can be used to process the input. Perform inference to generate the initial CoT response:
[0071]
[0072] in, This represents the candidate responses (Initial Thought Chain (CoT) responses) generated by the teacher model. This represents the Teacher Model. Indicates a prompt word. This represents the model parameters of the teacher model.
[0073] S22: Perform data quality filtering on the candidate responses. The data quality filtering includes answer correctness filtering and logical correctness filtering. The answer correctness filtering is used to retain samples in the candidate responses whose predicted answers are consistent with the true labels. The logical correctness filtering is used to retain samples whose reasoning process conforms to the causal relationship consistency constraint according to the causal graph.
[0074] According to one embodiment of the present invention, this step performs data quality filtering on candidate responses through a quality filtering mechanism, including dual filtering of "answer correctness" and "logical correctness" to ensure the data quality of the final supervised fine-tuning (SFT) training set. The filtering process first performs answer correctness filtering (answer verification), retaining only samples whose regression prediction or classification results are consistent with the true labels; subsequently, logical correctness filtering is performed on the samples that pass the answer correctness filtering to achieve in-depth logical evaluation. In other words, the method of the present invention performs data quality filtering on the candidate responses, which includes answer correctness filtering and logical correctness filtering. Answer correctness filtering includes: extracting the final answer from the candidate responses, comparing it with the true labels in the corresponding prompt-label pairs, and retaining only samples whose prediction or classification results are consistent with the true labels; logical correctness filtering includes: among the samples that pass the answer correctness filtering, using an evaluation model to perform logical evaluation of the reasoning process, checking whether it conforms to the causal consistency constraint, and retaining only samples that receive a perfect score in the evaluation. The present invention introduces the causal consistency constraint into the seven-dimensional reasoning quality evaluation framework.
[0075] According to one embodiment of the present invention, illustrative evaluation prompts guiding the evaluation model to perform logical correctness filtering include, for example: Figure 3 As shown. In the "Logical Correctness Filtering," the evaluation model used in the research process and subsequent experiments of this invention is KimiK2-0905. Only samples that score full marks in the evaluation are retained for subsequent supervised fine-tuning training. Preferably, the logical correctness filtering includes the following multi-dimensional evaluations: internal consistency evaluation, used to determine whether the reasoning steps are coherent and can logically derive the correct conclusion; terminology overlap evaluation, used to evaluate whether the terms used in the reasoning process are consistent with the terms in the given context; number of reasoning steps evaluation, used to confirm whether the reasoning contains a preset N (e.g., 3, 4, or 5) or more steps; logical consistency evaluation, used to verify whether the relationship between the time-series data described in the reasoning is consistent with the causal relationship provided in the given context; content diversity evaluation, used to check whether the reasoning process avoids unnecessary repetition and provides diverse and meaningful steps; task domain relevance evaluation, used to verify whether the reasoning is strictly based on time-series data and focuses on the task domain described in the task description; task instruction relevance evaluation, used to determine whether the reasoning strictly follows the task instructions and the given context; wherein, the logical correctness filtering only retains candidate responses where the result of each dimension in the multi-dimensional evaluation is "yes."
[0076] Let the final filtered sample data be... ,in, This represents the set of cue words in the supervised fine-tuning training set, which consists of each supervised fine-tuning sample. This represents the set of teacher thought chain responses in the supervised fine-tuning training set, which consists of each supervised fine-tuning sample.
[0077] S23: Use the prompt words and their corresponding teacher thought chain responses as samples for supervised fine-tuning, and perform supervised fine-tuning on the large model that serves as the student to obtain the large model after supervised fine-tuning.
[0078] According to one embodiment of the present invention, filtered sample data is used. Supervised fine-tuning of the base model is performed, with the optimization objective being the standard language modeling loss, minimizing the negative likelihood function as follows:
[0079]
[0080] in, This represents the loss function during the supervised fine-tuning phase. Indicates input prompt words, This indicates the teacher's thought process response. It belongs to the symbol. This indicates that the supervised fine-tuning sample consists of input prompts and teacher thought chain responses. This represents the set of cue words in the supervised fine-tuning training set, which consists of each supervised fine-tuning sample. This represents the set of teacher thought chain responses in the supervised fine-tuning training set, which consists of various supervised fine-tuning samples. This indicates that all positions in the teacher's thought process response sequence are summed. This represents the position index in the teacher's thought chain response sequence, starting from 1 for counting. This indicates the sequence length of the teacher's thought process response. Represents the natural logarithm. This represents the probability that the large model, acting as a student, will generate the current target text unit given the input prompt and the previously generated context. This indicates the first step in the teacher's thought process response sequence. Text units at each location, This indicates that the teacher's response is located at the [number]th [position / step] in the thought process chain. The sequence consisting of all text units preceding the first text unit. This represents the parameters of the large model acting as the student. The negative likelihood function serves the following purpose: for each supervised fine-tuning sample in the supervised fine-tuning sample set, consisting of an input cue word and a teacher's thought chain response, calculate the sum of the negative log probabilities of the large model acting as the student generating each target text unit given the input cue word and the generated preceding text. By minimizing this negative likelihood function, the large model acting as the student learns to generate structured outputs consistent with the teacher's thought chain responses.
[0081] Through the supervised fine-tuning phase, the large model, after being supervised fine-tuned, can acquire basic temporal reasoning format adherence and preliminary causal awareness.
[0082] V. Reinforce Learning Fine-tuning (Training Phase Two)
[0083] According to one embodiment of the present invention, this stage employs the Group Relative Policy Optimization (GRPO) algorithm for reinforcement learning fine-tuning. To guide the large model in generating high-confidence inference results that are formatted correctly, accurate in judgment, and consistent with causal logic, this stage designs a fine-grained reward mechanism consisting of three complementary dimensions: answer correctness reward. Format accuracy reward Rewards for consistency with causal logic Ultimately, the total reward value during reinforcement learning. Defined as:
[0084]
[0085] in, Rewards for correct answers, Rewards are given for format accuracy. Rewards are given for consistency of causal logic. The weighted coefficient for the reward based on the correctness of the answer. The weighting factor for the format accuracy bonus. , which is the weighting coefficient for the causal logic consistency reward. The causal logic consistency reward characterizes the degree of matching between the relationship between the time-series data described in the thought chain generated by the large model and the causal relationship provided in the prompt words.
[0086] The following is a schematic illustration of how each reward component is calculated:
[0087] a) Reward for correct answers
[0088] In prediction tasks (regression tasks), the reward is based on the correctness of the answer. This is used to evaluate how closely the model's predictions match the true labels. Considering the continuous nature of rating predictions in assessment tasks such as physical health (e.g., mood level, fatigue level), this invention employs a soft-matching strategy based on error tolerance, rather than a simple binary right / wrong judgment. For successfully extracted prediction values... The calculation method for the reward based on the correct answer is as follows:
[0089]
[0090] in, This represents the reward for a correct answer; 1.0 represents the initial maximum score. This represents the model's predicted value. Indicates the true label, This represents the maximum value of the task label. Taking the PMData dataset as an example, the training readiness task has a rating range of 1 to 10, so its... =10; while the levels for fatigue, emotional state, and stress are between 1 and 5, so their... =5. In this formula, when the absolute error between the model's predicted value and the true label does not exceed the error tolerance threshold of 2, the correct answer reward adopts a soft matching strategy based on error tolerance. The decay amount is calculated by multiplying 2 by the absolute error between the model's predicted value and the true label and then dividing by the maximum value of the task label. The final reward value is obtained by subtracting this decay amount from the initial full score. When the absolute error between the model's predicted value and the true label exceeds the error tolerance threshold of 2, the correct answer reward value is set to 0.0 (zero). This formula design allows large models to still receive partial rewards when the difference between the predicted value and the true value does not exceed 2 levels, while encouraging the model to pursue more accurate predictions through a linear decay mechanism.
[0091] In classification tasks, the reward for correct answer is a binary reward value (0 or 1). A reward value of 1 point is obtained only if the model's classification result is correct; otherwise, it is 0 points.
[0092] b) Format accuracy reward
[0093] To ensure that the output of the large model conforms to the preset structured specifications and facilitates subsequent automated parsing, this embodiment requires that the large model response strictly follow the prompt words. It uses a pre-defined JSON format and includes a specific hierarchical field structure. Format bonus. The calculation uses a tiered scoring mechanism:
[0094] 1) JSON validity check (+0.1 points): First, attempt to parse the model output into JSON. If the output string can be successfully parsed into a valid JSON object and the root node is a dictionary, a base score of 0.1 points will be awarded; otherwise, the format bonus will be set to zero.
[0095] 2) Root Node Structure Verification (+0.2 points): The JSON root node must contain two top-level fields: a "Thought" field and an "Answer" field, both of which must be dictionaries. Each field's correct existence earns 0.1 points. The two key fields are considered correct only if the output string can be successfully parsed into a valid JSON object and the two key fields are "Thought" and "Answer".
[0096] 3) CoT Fine-grained Structure Test (+0.4 points): Within the thinking field, it is required to contain four structured reasoning steps, namely timeline alignment, data analysis, causal verification, and reasoning. Each step can earn 0.1 points.
[0097] 4) Answer field integrity check (+0.3 points): The answer field must contain three key subfields: data summary, inference process, and final answer. Each field will be awarded 0.1 points for its existence.
[0098] This hierarchical scoring mechanism effectively improves the stability and parsability of the model output through fine-grained structural constraints.
[0099] c) Reward for causal consistency
[0100] Causal consistency reward The aim is to evaluate whether the thought chain (CoT) generated by the model is consistent with the causal prior knowledge provided in the input prompts, thereby effectively suppressing illusions and enhancing the interpretability of reasoning. Illustratively, this embodiment adopts the "LLM-as-a-Judge" paradigm, utilizing a separately deployed reward evaluation model to automatically score the reasoning process. Reward evaluation prompts include... Figure 4 As shown.
[0101] The reward evaluation model first scores the logical consistency of the input thought process, and then normalizes the score results to... The interval is used to obtain the final causal logic consistency reward value. .
[0102] VI. Reasoning Application and Experimental Verification
[0103] To verify the effectiveness of the causal enhanced temporal reasoning large model fine-tuning method proposed in this invention, the inventors conducted experimental verification on a publicly available benchmark dataset and calculated quantitative evaluation indicators.
[0104] 1) Experimental setup
[0105] a) Dataset
[0106] PMData: PMData is a multimodal lifestyle data set constructed and publicly released by the Simula Research Laboratory in Norway. It records the daily life and exercise behavior of 16 volunteers (13 men and 3 women) over a period of 5 months, covering the following data modalities: (1) Objective physiological and activity data: collected through Fitbit Versa 2 smartwatch, including heart rate, steps, distance, calorie consumption and sleep stages; (2) Subjective health and training load indicators: recorded through the PMSys mobile application, covering self-assessment scales of fatigue, emotional state, training readiness, stress level, sleep quality and muscle soreness; (3) Lifestyle and dietary information: collected through structured electronic questionnaires, including daily dietary records, water intake and weight changes, etc., and some subjects provided additional food image data. This experiment selected calories, distance, steps, heart rate and sleep duration as core physiological indicators, and aggregated the data in hourly units. Among them, heart rate is subdivided into maximum, minimum and average heart rate, and sleep indicators cover wakefulness duration, REM duration and deep sleep duration. By collecting 24-hour physiological time-series data from subjects and combining prediction targets across four dimensions—fatigue, mood, readiness, and stress—a total of 6468 question-label pairs containing explicit causal association descriptions were constructed using the aforementioned causal knowledge injection method. For dataset partitioning, 5828 samples were randomly selected as the training set, and the remaining 640 as the test set. During the training phase, 1000 samples were randomly selected from the training set for generating CoT data (each sample randomly generated 10 responses; this setting was also used for the other two datasets). After quality filtering, SFT cold-start training was performed. The remaining 4828 samples were used for subsequent reinforcement learning alignment training.
[0107] The SelfRegulationSCP1 dataset, sourced from the BCI Competition II and provided by the University of Tübingen, Germany, records EEG data from a healthy subject performing a slow cortical potential self-regulation task. During the experiment, the subject learned to control the positivity or negativity of their own cortical potentials through visual feedback: positive cortical potentials caused the cursor to move downwards, and negative potentials caused the cursor to move upwards. Each trial lasted 6 seconds, with task cues (highlighted targets at the top or bottom of the screen) presented from the 0.5th second, and a visual feedback period (3.5 seconds) from the 2.0th to the 5.5th second. This dataset only uses data from the feedback period for training and testing. The dataset contains 6 EEG channels: A1-Cz, A2-Cz, C3 (2cm in front), C3 (2cm behind), C4 (2cm in front), and C4 (2cm behind). The data sampling rate is 256 Hz, with 896 sampling points per trial. The task is a binary classification problem, with categories being negative and positive cortical potentials. The training set contains 268 samples (168 from day 1 and 100 from day 2), and the test set contains 293 samples. This experiment follows the standard splitting method for this dataset for training and testing, and 54 samples were randomly selected from the training set to generate the CoT dataset.
[0108] AW_FB: The AW_FB dataset originates from a laboratory study evaluating the performance of consumer wearable devices. This dataset contains multidimensional physiological observation data from 49 subjects (23 males and 26 females) during a 65-minute standardized experimental procedure. During the experiment, subjects simultaneously wore an Apple Watch Series 2 and a Fitbit Charge HR2, and sequentially completed six typical activities ranging from resting states (sitting and lying down) to treadmill exercises of varying intensities (walking and running at 3 / 5 / 7 METs). This dataset uses minute-level sampling granularity; this experiment extracted step length, heart rate, calories, and distance data every 7 minutes as key features for classifying the subjects' exercise states. Based on a causal knowledge injection method, this experiment constructed 5676 question-label pairs containing explicit causal association descriptions, and divided them in a 9:1 ratio into a training set (5116 pairs) and a test set (560 pairs). Similar to PMData, the AW_FB dataset also randomly selected 1000 samples from the training set for generating the CoT data.
[0109] b) Comparison method:
[0110] To comprehensively evaluate the performance of the proposed method CauTimeLLM-R1, this experiment selected seven representative baseline models for comparative analysis, covering different parameter sizes, model architectures, and application domains: For ultra-large-scale general-purpose language models, DeepSeek-V3.2 (total parameters up to 685B), Kimi K2.5 (total parameters up to 1000B, activation parameters about 32B), and GPT-5.2, all using the MoE architecture, were introduced; for lightweight and open-source models, Qwen3-Next-80B-A3B-Instruct (MoE architecture, total parameters 80B, activation parameters about 3B) and Qwen3-8B (dense architecture) were selected; in addition, to evaluate the specialization of the proposed method in specific domains, this experiment also compared it with the baseline models ChatTS-14B and TimeOmni-1 (total parameters 7B), which are specifically designed for time-series data inference.
[0111] c) Parameter settings
[0112] The causal discovery algorithm used in the causal injection phase of this experiment is the LiNGAM algorithm. The training process is divided into two phases, and the key hyperparameter settings for each phase are as follows:
[0113] SFT Cold Start Phase: This phase of the experiment was conducted on eight NVIDIA A800-SXM4-80GB GPUs using the LlamaFactory framework, with full parameter fine-tuning based on the Qwen3-8B. During training, DeepSpeed's ZeRO-2 optimization strategy was employed to improve memory utilization efficiency, combined with bfloat16 mixed-precision training to accelerate computation and enhance numerical stability. The optimizer learning rate was set to... The system employs a cosine annealing scheduling strategy and sets a 10% warmup ratio to stabilize gradient updates during the initial training phase. Training consists of 5 epochs, with a batch size of 2 per GPU and a gradient accumulation step count of 4. Furthermore, a gradient checkpointing mechanism is enabled to further reduce GPU memory usage.
[0114] GRPO Reinforcement Learning Phase: This phase of the experiment was conducted on eight NVIDIA A800-SXM4-80GB GPUs based on the VERL framework. Four GPUs used the FSDP2 parallel strategy for reinforcement learning training, while the other four GPUs deployed the causal consistency scoring model GLM-4.7-Flash (30B) using a four-way tensor parallel strategy. In the GRPO algorithm configuration, for each prompt, the vLLM inference engine simultaneously sampled 12 responses for within-group advantage calculation; the learning rate of the policy network was set to... The KL divergence penalty coefficient was set to 0.001; the global training batch size was 64, further subdivided into batches of size 16 (ppo_mini_batch_size) for gradient updates. To ensure the determinism of the reward signal, the temperature of the scoring model during inference was set to 0.
[0115] Inference phase: For DeepSeek-V3.2, Kimi K2.5, and GPT-5.2, standard API interfaces are used for calls; for locally deployed models (Qwen3 series, CauTimeLLM-R1, ChatTS and TimeOmni-1), the vLLM inference engine is used for acceleration, with sampling parameters set to temperature=0.6 and top_p=0.95.
[0116] d) Evaluation Indicators
[0117] This study constructs a two-dimensional evaluation system to comprehensively examine the model's performance from two aspects: prediction or classification accuracy and inference quality.
[0118] Objective performance metrics: For the accuracy of the model's inference results, accuracy is used to quantitatively measure the performance of classification tasks, while mean absolute error (MAE) is used to quantitatively measure the performance of prediction tasks. The calculation formula is as follows:
[0119]
[0120] in, Represents the number of samples. For the true value, These are predicted values.
[0121] Reasoning Quality Metrics: To evaluate the quality of the reasoning process generated by the model, this experiment scored the model output from three aspects: text readability, logical consistency, and comprehensiveness of reasoning. Considering that manual evaluation requires domain experts to read each reasoning process line by line and subjectively score according to multi-dimensional standards, the process is cumbersome and difficult to reproduce on a large scale, exhibiting significant limitations in terms of time cost and scalability, this experiment ultimately adopted the "LLM-as-a-Judge" paradigm for scoring. To evaluate the accuracy and professionalism of the model's scoring, this study randomly selected ten samples from each of the three datasets and used the Kimi K2-0905 model and DeepSeek-V3.2 to automatically score the reasoning process of the samples, with scoring prompts such as... Figure 5-7 As shown in the figure. This study compares the scores of the two models with the scores annotated by humans, and calculates the quadratic weighted kappa (QWK) coefficient for each model. The results are as follows. Figure 8As shown, the Kimi K2-0905 model outperforms DeepSeek-V3.2 in all three dimensions—text readability, logical consistency, and reasoning comprehensiveness—with scores all exceeding 0.9. This indicates that the Kimi K2-0905 model demonstrates a high degree of consistency with human annotations in terms of reasoning quality scores. Therefore, this experiment uses the scoring results of the Kimi K2-0905 model as the final reasoning quality assessment result. It should be noted that the evaluation model chosen in this experiment is Kimi K2-0905, while the comparison model is Kimi K2.5. This is because the evaluation model requires frequent API calls during the experiment; considering both call costs and response stability, Kimi K2-0905 was selected to reduce experimental overhead while ensuring evaluation quality. The comparison model, however, needs to be benchmarked against the most powerful language models currently available to fully validate the method's upper limit; therefore, the flagship model Kimi K2.5, used during the experiment, was chosen.
[0122] 2) Comparative Experiment
[0123] To evaluate the performance of the proposed method CauTimeLLM-R1 in time-series inference tasks, this experiment compared it with seven baseline models on three datasets: PMData, SelfRegulationSCP1, and AW_FB. PMData is a physiological indicator prediction task based on multi-source time series, AW_FB is a classification task based on multi-source time series, and SelfRegulationSCP1 is a classification task based on multivariate time series.
[0124] i) Model performance analysis
[0125] Table 1 shows the MAE results of each model on the PMData dataset for four prediction tasks: Fatigue, Mood, Readiness, and Stress, as well as the overall classification accuracy (Acc) results on the SelfRegulationSCP1 and AW_FB datasets. From the experimental results, we can see that:
[0126] The proposed method achieved state-of-the-art performance on all evaluation tasks: On the PMData dataset, CauTimeLLM-R1 significantly lowered the MAE values of existing mainstream models across all four prediction tasks, with an overall MAE value 25.4% lower than the pre-training base model Qwen3-8B, and 36.4%, 33.6%, and 35.8% lower than larger-scale models DeepSeek-V3.2, Kimi K2.5, and GPT-5.2, respectively. This demonstrates that task-specific fine-tuning can effectively unleash the vertical domain potential of lightweight models, enabling them to outperform general-purpose large-scale models. On the SelfRegulationSCP1 classification task, CauTimeLLM-R1 achieved an accuracy of 51.19%, significantly outperforming all baseline models and improving upon the base model Qwen3-8B by approximately 233%. On the AW_FB dataset, the overall accuracy of each model was not high due to task difficulty limitations, but CauTimeLLM-R1 still improved upon Qwen3-8B by approximately 71.6%, outperforming all compared methods. This result fully demonstrates that, through specific fine-tuning and reinforcement learning mechanisms for time series data, CauTimeLLM-R1 can more accurately capture the evolution patterns of multidimensional physiological time series data, exhibiting strong adaptability in both regression and classification tasks.
[0127] Significant differences exist in the errors across different prediction tasks: on the PMData dataset, the MAE values for fatigue and stress level prediction tasks are generally low, while the MAE values for the training readiness task are relatively high. Despite the varying task difficulties, CauTimeLLM-R1 maintains optimal error control across all dimensions, demonstrating robust adaptability to multi-task time series analysis.
[0128] The performance of the comparison methods is not necessarily correlated with model size: on the PMData dataset, DeepSeek-V3.2, Kimi K2.5, and GPT-5.2 all have higher overall MAE values than Qwen3-8B; on the SelfRegulationSCP1 and AW_FB datasets, the classification accuracy of large-scale parameter models is not optimal (e.g., GPT-5.2 only achieves 27.99% and 19.46%, respectively). This indicates that without task-specific fine-tuning, models with larger parameter sizes do not necessarily achieve better results. Furthermore, Qwen3-Next-80B-A3B-Instruct, which uses the MoE architecture, performs poorly on both datasets, suggesting that in specific task scenarios, increasing model size or introducing sparse structures does not necessarily lead to performance gains; dense, small-scale models, after targeted fine-tuning, may actually possess more stable predictive capabilities.
[0129] This method comprehensively outperforms professional baseline models for temporal inference: On the PMData dataset, TimeOmni-1's overall MAE value is better than some large-scale general models (such as DeepSeek-V3.2 and GPT-5.2), but still higher than CauTimeLLM-R1; ChatTS-14B achieves an accuracy of 50.17% on SelfRegulationSCP1, second only to our method, indicating that dedicated temporal coding is helpful for EEG feedback classification. However, on the AW_FB dataset, the accuracies of the two models are 18.04% and 19.14%, respectively, which do not exceed those of large-scale general models and are far lower than CauTimeLLM-R1. This indicates that in the context of strong noise and activity switching in consumer wearable devices, general temporal-text alignment alone is insufficient to fully uncover discriminative cues, while explicit causal priors and a two-stage fine-tuning strategy help to further narrow the gap between the predicted distribution and the true label.
[0130] Table 1. Comparison of model performance on different datasets
[0131]
[0132] ii) Reasoning quality analysis
[0133] Table 2 presents the evaluation results (out of 3.0) for text readability, logical consistency, and comprehensiveness of reasoning for each model on the three datasets. Overall, CauTimeLLM-R1 achieved the highest scores across all evaluation dimensions on the three datasets. On the PMData dataset, the scores for logical consistency and comprehensiveness of reasoning were improved by 63.8% and 51.1% respectively compared to the base model Qwen3-8B; the most significant improvements were observed on the AW_FB dataset, reaching 92.3% and 53.5% respectively. These results demonstrate that the reasoning optimization mechanism for time-series tasks can significantly improve the rigor of reasoning logic and the completeness of information coverage while ensuring text readability, and this advantage is consistent across different types of time-series tasks.
[0134] Looking at the performance of baseline models across different dimensions, all models scored highly and showed little difference in terms of text readability, indicating that current LLM models have achieved relatively stable capabilities in text fluency. However, significant differences emerged in logical consistency and comprehensive reasoning: large-scale general-purpose models (such as GPT-5.2, DeepSeek-V3.2, and Kimi K2.5) performed better, while smaller-scale models (such as Qwen3-8B) scored significantly lower, indicating limitations in logical consistency and information coverage in complex temporal reasoning. ChatTS-14B and TimeOmni-1 were close to other models in readability, but significantly lagged behind in logical consistency and comprehensive reasoning, indicating significant logical fallacies and illusions when handling complex, long-context temporal tasks, and insufficient information and data consideration in the reasoning path.
[0135] Table 2. Evaluation results of model inference quality on each dataset
[0136]
[0137] The comparative experimental results above show that CauTimeLLM-R1 achieves the best results in both the MAE index for regression prediction and the accuracy index for classification tasks. At the same time, it also has the highest evaluation scores in the three dimensions of text readability, logical consistency and reasoning comprehensiveness, which verifies the feasibility and generalization ability of causal knowledge injection and two-stage fine-tuning strategy in different types of temporal reasoning tasks.
[0138] 3) Ablation experiment
[0139] To further analyze the advantages of the proposed method compared with conventional fine-tuning strategies and to verify the role of each training stage and the causal logic consistency constraint mechanism, this section designed four ablation experiments to compare the performance of different fine-tuning strategies: (1) Only Causal-SFT: SFT is performed using only causal association augmentation data, without reinforcement learning stage; (2) OnlyCausal-GRPO: Reinforcement learning training with causal association augmentation is performed directly using the base model Qwen3-8B, skipping the SFT cold start stage; (3) SFT + GRPO (w / o Causality): A two-stage training process is adopted, but causal knowledge injection and causal logic consistency verification are removed, and the reward function only retains the format accuracy reward and answer correctness reward; (4) CauTimeLLM-R1: The complete proposed method, including SFT cold start with causal injection and GRPO reinforcement learning with three-dimensional rewards.
[0140] Model performance analysis
[0141] Table 3 shows the performance of different fine-tuning strategies on the three datasets. The following key findings can be observed from the table:
[0142] The necessity of causal logical consistency constraints: Comparing SFT + GRPO (w / o Causality) with the complete CauTimeLLM-R1, it can be found that removing causal logical consistency constraints results in performance degradation on all three datasets. On PMData, the overall MAE increased by 12.7%, while on AW_FB, the accuracy decreased by approximately 2.0%. This demonstrates that causal logical consistency constraints can effectively enhance the model's performance in different types of temporal inference tasks.
[0143] The necessity of the cold start phase: The Only Causal-GRPO strategy directly trains the base model using reinforcement learning, and its performance on the SelfRegulationSCP1 and AW_FB datasets is significantly worse than that of the two-stage method. Figure 9 Figures a, b, and c in the table show the training reward curves for reinforcement learning on three datasets with and without SFT cold start. It is evident that CauTimeLLM-R1, with SFT cold start, achieves higher rewards in the early stages of reinforcement learning, with faster improvement and earlier convergence; while Only Causal-GRPO without cold start has lower initial rewards, slower growth, and consistently lower rewards than CauTimeLLM-R1. This indicates that SFT cold start provides a good initialization for the model, enabling it to align with the task objective more quickly and continuously obtain high-quality reward feedback during the reinforcement learning phase.
[0144] Effectiveness of two-stage training: The complete method CauTimeLLM-R1 outperforms single-stage strategies across all evaluation dimensions on three datasets, achieving the best performance. This demonstrates the complementarity between SFT cold start and GRPO reinforcement learning: the SFT stage enables the model to master basic inference formats and causal cognition, while the GRPO stage further optimizes inference quality through a fine-grained reward mechanism. This collaborative mechanism exhibits good adaptability and stability across different temporal task types.
[0145] Table 3. Performance comparison of models using different fine-tuning strategies on various datasets.
[0146]
[0147] ii) Reasoning quality analysis
[0148] Figure 10The results of the inference quality evaluation for each strategy on three datasets are presented. As can be observed from the figures, all four strategies demonstrate high performance in the dimension of text readability, indicating that the model is approaching maturity in terms of language generation standardization. However, in the two core metrics of logical consistency and comprehensive reasoning, the different components play different roles, as detailed below:
[0149] Causal logical consistency constraints significantly improve inference logical consistency: CauTimeLLM-R1 demonstrates a clear advantage in logical consistency and inference comprehensiveness, with scores significantly outperforming other strategies. In particular, on the PMData and AW_FB datasets, the logical consistency score is improved by 5.6% and 11.0% respectively compared to the SFT + GRPO (w / o Causality) strategy, strongly demonstrating the positive role of causal logical consistency constraints in improving the inference logical consistency of the model in complex multi-source scenarios.
[0150] SFT cold start lays the foundation for high-quality inference distribution: The Only Causal-GRPO strategy is the least effective in terms of logical consistency and comprehensiveness of inference. This indicates that due to the huge search space of reinforcement learning, the lack of initial alignment of high-quality inference paths in the SFT stage will make it difficult for the model to converge to a high-quality inference distribution during training, thus affecting the robustness of the final generated inference results.
[0151] Combined with Table 3 Figure 10 The results show that CauTimeLLM-R1 outperforms single-stage SFT, single-stage GRPO, and two-stage training without causal logical consistency constraints. This indicates that the proposed fine-tuning strategy is not simply an addition of SFT and GRPO, but rather continuously introduces causal logical consistency constraints during the two-stage training process, thereby improving the model's prediction or classification performance while further enhancing the credibility and interpretability of the inference process.
[0152] 4) Parameter sensitivity analysis
[0153] To investigate the impact of different historical time window lengths on model performance and inference quality, this experiment conducted a parameter sensitivity test on the PMData dataset. This dataset contains nine physiological variables: calories, distance, steps, heart rate (maximum / minimum / average), and sleep (awake / REM / deep sleep). The experiment set time windows of 24, 48, 96, 192, and 384 hours, meaning the model could obtain historical time-series data for each variable over the corresponding number of hours as input during inference. The experimental results are as follows: Figure 11 As shown, the prediction accuracy and inference quality of the model exhibit different variation patterns under different time windows.
[0154] In terms of prediction accuracy, the MAE value shows a downward trend in the 24-96 hour range as the historical time window lengthens, indicating that moderately increasing historical information helps the model capture a more complete temporal evolution pattern. When the window is further expanded to 192 hours and 384 hours, the MAE value, although slightly rebounding, remains at a low level, representing improvements of 10.1% and 8.0% respectively compared to the 24-hour window. This result shows that even within a time window as long as 384 hours, the model can still maintain good prediction performance, indicating that the proposed method has the ability to handle long-term historical data, and redundant information does not significantly interfere with the model.
[0155] In terms of reasoning quality, all metrics maintained high stability across a wide time window. Text readability and reasoning comprehensiveness consistently remained at or near-perfect scores within the 24-384 hour range, indicating that the model can generate clearly structured and complete reasoning texts under various time window settings. Logical consistency exhibited a fluctuating trend of first decreasing, then increasing, and then decreasing again, reaching an optimal value of 2.961 in the 192-hour window and 2.878 in the 384-hour window, remaining at a high level overall. These results demonstrate that the model maintains stable reasoning quality across different time window lengths; even in long-term window scenarios, the generated reasoning process still possesses good readability, logic, and comprehensiveness.
[0156] In summary, the proposed method demonstrates good robustness under different time window settings. Even with long-term historical data input of up to 384 hours, the model can still maintain stable prediction accuracy and inference quality, verifying the effectiveness and reliability of the method in processing long-term time series data.
[0157] 5) Case Studies
[0158] To visually demonstrate the differences in the inference processes of each model, this experiment randomly selected a typical example from the PMData dataset (the prompts for the comparison methods did not contain causal content, but were otherwise identical) and compared and analyzed the inference performance of Qwen3-8B, ChatTS-14B, GPT-5.2, and the CauTimeLLM-R1 method. The example is shown below. Figure 12 As shown, the inference results of each model on the PMData dataset samples are as follows: Figure 13As shown in the examples, the lightweight baseline models exhibit significant shortcomings in handling long-sequence time alignment. Both Qwen3-8B and ChatTS-14B made major factual errors during the timeline alignment stage, failing to accurately map data indices to the real-world time dimension, causing subsequent analysis to completely deviate from the correct timeline context. Furthermore, ChatTS-14B generated factual errors regarding heart rate amplitude and sleep stage changes during the data analysis stage, directly leading to unreliable final analysis results. While GPT-5.2, as a large-scale general-purpose model, possesses strong language organization and knowledge retrieval capabilities and can generate fluent reasoning text, it still exhibits a degree of "illusion" in this timeline reasoning task. In contrast, the proposed CauTimeLLM-R1 model does not contain any factual errors throughout the entire reasoning chain. Moreover, by introducing a dedicated causal verification module, it further verifies the consistency between the data analysis results and prior causal knowledge, thereby enhancing the credibility of the reasoning process.
[0159] In addition to the prediction task, to more comprehensively demonstrate the model's reasoning ability, this experiment randomly selected a classification task example from the AW_FB dataset. The reasoning results of CauTimeLLM-R1 are as follows: Figure 14 As shown in the figure, CauTimeLLM-R1 accurately described all four indicators during the data analysis phase, perfectly matching the original data in terms of values, time sequence, and trends, without any factual errors. More importantly, the model fully utilized the prior knowledge injected into the prompts during the causal verification phase. When observed data did not satisfy existing causal relationships, the model could automatically identify them as unreliable signals and reduce their impact during the decision-making process. This example intuitively demonstrates the crucial role of causal prior knowledge injection in suppressing data noise interference and enhancing the credibility of inference.
[0160] In summary, this invention proposes a fine-tuning method for causal augmentation models for reasoning with multi-source temporal data. This method effectively constrains the model's reasoning process by embedding causal knowledge into structured prompts and introducing causal logical consistency evaluation into the reward mechanism. The method employs a two-stage training mode combining cold start and reinforcement learning, ensuring standardized reasoning format while further improving the interpretability and reliability of the reasoning process. Furthermore, experiments conducted on three publicly available benchmark datasets covering physiological state prediction, signal classification, and motion state classification tasks demonstrate that, compared to the best baseline model, this method achieves a 25.4% reduction in prediction error (PMData dataset), a 2.0% improvement in classification accuracy (SelfRegulationSCP1 dataset), and a 23.7% improvement in classification accuracy (AW_FB dataset), respectively. It also achieves the highest scores in the three reasoning quality evaluation dimensions of text readability, logical consistency, and reasoning comprehensiveness, verifying the effectiveness of the causal logical consistency constraint mechanism in improving the quality of temporal reasoning.
[0161] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.
[0162] This invention can be a system, method, electronic device, computing device, computer program product and / or computer-readable medium.
[0163] Computer program products mainly refer to software products that implement various aspects of the present invention through computer programs, or hardware products that carry software that implements various aspects of the present invention.
[0164] Computer-readable storage media can be tangible devices that hold and store instructions for use by an instruction execution device. Computer-readable storage media can include, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.
[0165] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for fine-tuning a causal reinforcement large model, characterized in that, include: Step S1: Obtain the multi-source time series dataset collected by monitoring human body status, use the causal discovery algorithm to mine the causal knowledge between time series variables from different sources in the dataset, and construct multiple prompt word-label pairs containing causal knowledge, wherein the labels are the true answers to the task in numerical or categorical form; Step S2: Select a portion of samples from the multiple prompt word-label pairs, and have the teacher model reason about the prompt words of the selected samples to generate candidate responses containing a structured reasoning process. After data quality filtering of the candidate responses, obtain the teacher's thought chain response. Use the teacher's thought chain response and its corresponding prompt words as supervised fine-tuning samples to supervise the fine-tuning of the large model, which is the student, to obtain the large model after supervised fine-tuning. Step S3: Based on the remaining samples in the multiple prompt word-label pairs, the group relative strategy optimization algorithm is used to perform reinforcement learning fine-tuning on the supervised fine-tuning large model to obtain the large model after reinforcement learning fine-tuning. In the reinforcement learning, a multi-dimensional reward mechanism including answer correctness reward, format accuracy reward and causal logic consistency reward is used to guide the fine-tuning process of the large model.
2. The method according to claim 1, characterized in that, Step S1 includes: S11: The causal discovery algorithm is used to mine causal knowledge between time series variables from different sources in the multi-source time series dataset to obtain causal relationships, and a causal graph is constructed based on the causal relationships, where nodes represent time series variables and edges represent causal relationships between nodes; S12: Encode the direct and indirect causal relationships in the causal graph into causal descriptions in natural language form; S13: Construct prompt words based on the causal description and the time series data of the samples in the multi-source time series dataset. The prompt words include task description, background information, time series data, causal description, and output format requirements for the answer. The time series data in the prompt words is a comma-separated text string encoded from a numerical sequence. The output format requirements include: output in JSON format, output including inference process field and answer field. S14: Combine the prompt word with the corresponding sample label to obtain the prompt word-label pair.
3. The method according to claim 2, characterized in that, Step S12 includes: For each causal edge in the causal graph, a natural language description is generated to characterize how changes in the source variable of the causal edge lead to changes in the target variable. For the indirect causal path in the causal graph, a natural language description containing transitivity constraints is generated to characterize that if the source variable affects the intermediate variable and the intermediate variable affects the target variable, then the source variable will indirectly affect the target variable.
4. The method according to claim 2, characterized in that, Step S2 includes: S21: The teacher model infers the prompts of the selected samples and generates candidate responses that include a structured reasoning process; S22: Perform data quality filtering on the candidate responses, including: filtering by answer correctness to retain the part of the candidate responses where the predicted answer is consistent with the real label, to obtain a preliminary filtering result; and filtering by logical correctness to retain the part of the preliminary filtering result where the reasoning process conforms to the causal relationship consistency constraint according to the causal graph, to obtain the teacher's thought chain response; S23: Use the teacher's thought chain response and its corresponding prompts as samples for supervised fine-tuning, and perform supervised fine-tuning on the large model that serves as the student to obtain the large model after supervised fine-tuning.
5. The method according to claim 4, characterized in that, The logical correctness filtering includes the following multi-dimensional evaluation: Internal consistency assessment is used to determine whether the reasoning steps are coherent and can logically lead to the correct conclusion. Terminology overlap assessment is used to evaluate whether the terms used in reasoning are consistent with the terms in a given context. The reasoning step count assessment is used to confirm whether the reasoning contains more than N preset steps; Logical consistency assessment is used to verify whether the relationships between time-series data described in the reasoning are consistent with the causal relationships provided in the given context; Content diversity assessment is used to check whether the reasoning process avoids unnecessary repetition and provides diverse and meaningful steps; Task domain relevance assessment is used to verify whether the inference is strictly based on time series data and focuses on the task domain described in the task description. Task instruction relevance assessment is used to determine whether reasoning strictly follows the task instructions and the given context; The logical correctness filtering retains only candidate responses where the evaluation result for each dimension in the multidimensional evaluation is "yes".
6. The method according to claim 1, characterized in that, Total reward value during reinforcement learning for: in, Rewards for correct answers, Rewards are given for format accuracy. Rewards are given for consistency of causal logic. The weighted coefficient for the reward based on the correctness of the answer. The weighting factor for the format accuracy bonus. , which is the weighting coefficient for the causal logic consistency reward. The causal logic consistency reward characterizes the degree of matching between the relationship between the time-series data described in the thought chain generated by the large model and the causal relationship provided in the prompt words.
7. A method for prediction based on multi-source time series data, characterized in that, The method includes: Acquire multi-source time-series data to be processed from the monitoring of the human body under test; Input prompts containing causal knowledge are constructed based on the multi-source time series data to be processed. The input prompts include task description, background information, time series data, causal description, and output format requirements for the answer. The input prompt is input into the supervised fine-tuned large model obtained according to any one of claims 1-6, and the predicted response containing the structured reasoning process is obtained from the output of the supervised fine-tuned large model. The final answer is extracted from the predicted response.
8. A computer device / apparatus / system, comprising a memory, a processor, and a computer program / instructions stored in the memory, wherein the processor executes the computer program / instructions to implement the steps of the method according to any one of claims 1-7.
9. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program / instructions stored thereon, the computer program / instructions being executed by a processor to implement the steps of the method according to any one of claims 1-7.
