Skip to content

delaykimm/TEST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🧠 Interpretable Prototype: A Bridge from Text to Time-Series for LLM

This repository presents the code and resources for the research project "Interpretable Prototype: A Bridge from Text to Time-Series for LLM"

📌 Overview

This project explores how Large Language Models (LLMs) can be leveraged for time-series analysis tasks, including forecasting, classification, and anomaly detection.
To overcome the modality gap between time-series data and natural language, we introduce a novel method that aligns time-series embeddings with interpretable text prototypes.

🚀 Motivation

  • Generalizability: Traditional time-series models often require task-specific architectures and domain expertise.
  • LLM Potential: LLMs show strong few-shot/zero-shot capabilities, but cannot directly handle raw time-series due to modality mismatch.
  • Solution: Use interpretable text prototypes to align time-series embeddings with the LLM’s text embedding space.

🧠 Main Idea

  • Use text prototypes (e.g., "Trend", "Volatility", "Consumption") to represent key characteristics of time-series data.
  • Train a model to align time-series tokens with these interpretable text embeddings.
  • Improve interpretability, alignment, and performance on downstream tasks.

🔍 Methodology

📌 Framework

  1. Text Prototype Selection

    • General: Trend, Seasonality, Cyclicality, Volatility, ...
    • Dataset-specific: Electricity, Usage, Household, ...
  2. Embedding Training

    • Use CKA (Centered Kernel Alignment) Loss to align time-series embeddings with text embeddings.
    • Fixed text-prototypes + learnable weights for interpretability and training efficiency.
  3. Downstream Tasks

    • Apply to forecasting and classification using aligned embeddings.
  4. Interpretability

    • Visualize attention maps and cosine similarity between time steps and prototypes.

🔧 Architecture Highlights

  • Pre-trained LLM backbone (Transformer blocks)
  • Time-series embedder
  • Text-prototype alignment module
  • Cosine similarity + attention analysis

📊 Dataset

ElectricDevices Dataset

  • Behavioral energy usage data from UK households
  • 251 households, sampled every 2 minutes over 24 hours
  • 720 time steps per sequence

📁 Project Structure

📁 prototype-alignment-LLM/

  ├── test
    ├── ElectricDevices/                # Time-series datasets and labels
    ├── code/                           # Model architecture and training scripts
    ├── visualization/                  # Visualizations of Embedding
    ├── visulization_semantic/          # Visualizations of Embedding in Semantic Space matched with Words
  ├──README.md

📈 Key Metrics

  • CKA score improvements before & after alignment
  • Prototype attention maps
  • Interpretability with domain-relevant text concepts

🧾 References

  • OneFitsAll: Pretrained LM for Time-Series (NeurIPS 2023)
  • Time-LLM (ICLR 2024)
  • CALF (arXiv 2024)
  • TEST (ICLR 2024)
  • X-VILA (arXiv 2024)

🧑‍💻 Authors

  • Jiyun Kim
    Department of Computer Science & Engineering
    Korea University
    DAIS Lab (Lab Meeting 11.29)

About

Interpretable Prototype: A Bridge from Text to Time-Series for LLM (Research for DAIS Lab)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •