<p align="left">
<img width=15% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt=“DAI-Lab” />
<i>An open source project from Data to AI Lab at MIT.</i>
</p>
[](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)
[](https://badge.fury.io/py/sigllm)
[](https://pypi.python.org/pypi/sigllm)
[](https://github.com/sintel-dev/sigllm/actions/workflows/tests.yml)
[](https://pepy.tech/project/sigllm)
# SigLLM
Using Large Language Models (LLMs) for time series anomaly detection.
<!-- - Documentation: https://sintel-dev.github.io/sigllm -->
- Homepage: https://github.com/sintel-dev/sigllm
# Overview
SigLLM is an extension of the Orion library, built to detect anomalies in time series data using LLMs.
We provide two types of pipelines for anomaly detection:
* **Prompter**: directly prompting LLMs to find anomalies in time series.
* **Detector**: using LLMs to forecast time series and finding anomalies through by comparing the real and forecasted signals.
For more details on our pipelines, please read our [paper](https://arxiv.org/pdf/2405.14755).
# Quickstart
## Install with pip
The easiest and recommended way to install **SigLLM** is using [pip](https://pip.pypa.io/en/stable/):
```bash
pip install sigllm
```
This will pull and install the latest stable release from [PyPi](https://pypi.org/).
In the following example we show how to use one of the **SigLLM Pipelines**.
# Detect anomalies using a SigLLM pipeline
We will load a demo data located in `tutorials/data.csv` for this example:
```python3
import pandas as pd
data = pd.read_csv('data.csv')
data.head()
```
which should show a signal with `timestamp` and `value`.
```
timestamp value
0 1222840800 6.357008
1 1222862400 12.763547
2 1222884000 18.204697
3 1222905600 21.972602
4 1222927200 23.986643
5 1222948800 24.906765
```
In this example we use `gpt_detector` pipeline and set some hyperparameters. In this case, we set the thresholding strategy to dynamic. The hyperparameters are optional and can be removed.
In addtion, the `SigLLM` object takes in a `decimal` argument to determine how many digits from the float value include. Here, we don't want to keep any decimal values, so we set it to zero.
```python3
from sigllm import SigLLM
hyperparameters = {
"orion.primitives.timeseries_anomalies.find_anomalies#1": {
"fixed_threshold": False
}
}
sigllm = SigLLM(
pipeline='gpt_detector',
decimal=0,
hyperparameters=hyperparameters
)
```
Now that we have initialized the pipeline, we are ready to use it to detect anomalies:
```python3
anomalies = sigllm.detect(data)
```
> :warning: Depending on the length of your timeseries, this might take time to run.
The output of the previous command will be a ``pandas.DataFrame`` containing a table of detected anomalies:
```
start end severity
0 1225864800 1227139200 0.625879
```
# Resources
Additional resources that might be of interest:
* Learn about [Orion](https://github.com/sintel-dev/Orion).
* Read our [paper](https://arxiv.org/pdf/2405.14755).
# Citation
If you use **SigLLM** for your research, please consider citing the following paper:
Sarah Alnegheimish, Linh Nguyen, Laure Berti-Equille, Kalyan Veeramachaneni. [Can Large Language Models be Anomaly Detectors for Time Series?](https://arxiv.org/pdf/2405.14755).
```
@inproceedings{alnegheimish2024sigllm,
title={Can Large Language Models be Anomaly Detectors for Time Series?},
author={Alnegheimish, Sarah and Nguyen, Linh and Berti-Equille, Laure and Veeramachaneni, Kalyan},
booktitle={2024 IEEE International Conferencze on Data Science and Advanced Analytics (IEEE DSAA)},
organization={IEEE},
year={2024}
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "sigllm",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.9",
"maintainer_email": null,
"keywords": "sigllm, LLM4TS, timeseries, anomaly-detection",
"author": null,
"author_email": "MIT Data To AI Lab <dailabmit@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/bc/0f/51dad2d3930c37516815b80ab00c278f91866f2ecb53fbf91870ac41430e/sigllm-0.0.4.tar.gz",
"platform": null,
"description": "<p align=\"left\">\n<img width=15% src=\"https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png\" alt=\u201cDAI-Lab\u201d />\n<i>An open source project from Data to AI Lab at MIT.</i>\n</p>\n\n[](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)\n[](https://badge.fury.io/py/sigllm) \n[](https://pypi.python.org/pypi/sigllm)\n[](https://github.com/sintel-dev/sigllm/actions/workflows/tests.yml)\n[](https://pepy.tech/project/sigllm)\n\n\n# SigLLM\n\nUsing Large Language Models (LLMs) for time series anomaly detection.\n\n<!-- - Documentation: https://sintel-dev.github.io/sigllm -->\n- Homepage: https://github.com/sintel-dev/sigllm\n\n# Overview\n\nSigLLM is an extension of the Orion library, built to detect anomalies in time series data using LLMs.\nWe provide two types of pipelines for anomaly detection:\n* **Prompter**: directly prompting LLMs to find anomalies in time series.\n* **Detector**: using LLMs to forecast time series and finding anomalies through by comparing the real and forecasted signals.\n\nFor more details on our pipelines, please read our [paper](https://arxiv.org/pdf/2405.14755).\n\n# Quickstart\n\n## Install with pip\n\nThe easiest and recommended way to install **SigLLM** is using [pip](https://pip.pypa.io/en/stable/):\n\n```bash\npip install sigllm\n```\nThis will pull and install the latest stable release from [PyPi](https://pypi.org/).\n\n\nIn the following example we show how to use one of the **SigLLM Pipelines**.\n\n# Detect anomalies using a SigLLM pipeline\n\nWe will load a demo data located in `tutorials/data.csv` for this example:\n\n```python3\nimport pandas as pd\n\ndata = pd.read_csv('data.csv')\ndata.head()\n```\n\nwhich should show a signal with `timestamp` and `value`.\n```\n timestamp value\n0 1222840800 6.357008\n1 1222862400 12.763547\n2 1222884000 18.204697\n3 1222905600 21.972602\n4 1222927200 23.986643\n5 1222948800 24.906765\n```\n\nIn this example we use `gpt_detector` pipeline and set some hyperparameters. In this case, we set the thresholding strategy to dynamic. The hyperparameters are optional and can be removed.\n\nIn addtion, the `SigLLM` object takes in a `decimal` argument to determine how many digits from the float value include. Here, we don't want to keep any decimal values, so we set it to zero.\n\n```python3\nfrom sigllm import SigLLM\n\nhyperparameters = {\n \"orion.primitives.timeseries_anomalies.find_anomalies#1\": {\n \"fixed_threshold\": False\n }\n}\n\nsigllm = SigLLM(\n pipeline='gpt_detector',\n decimal=0,\n hyperparameters=hyperparameters\n)\n```\n\nNow that we have initialized the pipeline, we are ready to use it to detect anomalies:\n\n```python3\nanomalies = sigllm.detect(data)\n```\n> :warning: Depending on the length of your timeseries, this might take time to run.\n\nThe output of the previous command will be a ``pandas.DataFrame`` containing a table of detected anomalies:\n\n```\n start end severity\n0 1225864800 1227139200 0.625879\n```\n\n# Resources\n\nAdditional resources that might be of interest:\n* Learn about [Orion](https://github.com/sintel-dev/Orion).\n* Read our [paper](https://arxiv.org/pdf/2405.14755).\n\n\n# Citation\n\nIf you use **SigLLM** for your research, please consider citing the following paper:\n\nSarah Alnegheimish, Linh Nguyen, Laure Berti-Equille, Kalyan Veeramachaneni. [Can Large Language Models be Anomaly Detectors for Time Series?](https://arxiv.org/pdf/2405.14755).\n\n```\n@inproceedings{alnegheimish2024sigllm,\n title={Can Large Language Models be Anomaly Detectors for Time Series?},\n author={Alnegheimish, Sarah and Nguyen, Linh and Berti-Equille, Laure and Veeramachaneni, Kalyan},\n booktitle={2024 IEEE International Conferencze on Data Science and Advanced Analytics (IEEE DSAA)},\n organization={IEEE},\n year={2024}\n}\n```\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "LLMs for unsupervised time series anomaly detection",
"version": "0.0.4",
"project_urls": {
"homepage": "https://github.com/sintel-dev/sigllm/"
},
"split_keywords": [
"sigllm",
" llm4ts",
" timeseries",
" anomaly-detection"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "499d6b85d4603a8c3be08563e823bf407150c30cb1958fc35f1a734b10079a24",
"md5": "9ed314500f29893ca2a64560174a28a2",
"sha256": "0780173d4071942040fb0c2c0945ed12ceba4d730d1f938699bcd02f224cf07c"
},
"downloads": -1,
"filename": "sigllm-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ed314500f29893ca2a64560174a28a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.9",
"size": 48007,
"upload_time": "2025-07-31T21:54:36",
"upload_time_iso_8601": "2025-07-31T21:54:36.213952Z",
"url": "https://files.pythonhosted.org/packages/49/9d/6b85d4603a8c3be08563e823bf407150c30cb1958fc35f1a734b10079a24/sigllm-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bc0f51dad2d3930c37516815b80ab00c278f91866f2ecb53fbf91870ac41430e",
"md5": "1fb25f40ee656c15abcd165abefc0fe4",
"sha256": "1ee3e3d53b17b7365106be17cda35d8cb085ed7f72106a26ec52f23f71a88590"
},
"downloads": -1,
"filename": "sigllm-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "1fb25f40ee656c15abcd165abefc0fe4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.9",
"size": 88134,
"upload_time": "2025-07-31T21:54:37",
"upload_time_iso_8601": "2025-07-31T21:54:37.609839Z",
"url": "https://files.pythonhosted.org/packages/bc/0f/51dad2d3930c37516815b80ab00c278f91866f2ecb53fbf91870ac41430e/sigllm-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-31 21:54:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sintel-dev",
"github_project": "sigllm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "sigllm"
}