ALARM: Automated MLLM-Based Anomaly Detection in Complex-Environment Monitoring with Uncertainty Quantification

Published Online:https://doi.org/10.1287/ijds.2025.0107

Supplemental Material

Online Appendix: ijds.2025.0107.sm1.pdf

Software and Data: ijds.2025.0107.cd.zip


Description of Software and Data

The code and data in the zip file referenced above are a snapshot of the software and data that were used in the research reported in the paper "ALARM: Automated MLLM-Based Anomaly Detection in Complex-EnviRonment Monitoring with Uncertainty Quantification" by Congjing Zhang, Ryan Feng Lin, Xinyi Zhao, Pei Guo, Wei Li, Lin Chen, Chaoyue Zhao, Shuai Huang. This repository is also available via GitHub.

The goal of this repository is to replicate the numerical experiments in the paper.

Computer and Software Environment

All the experiments are run by Python 3.12.2 on Apple M3 Pro with 18GB of memory.

Dependencies

Installation

  1. Download and unzip the project folder.
  2. The repository contains two case studies: Smart Home and Wound. Each case study is organized into two subfolders: one for code and one for data.
  3. Smart Home case study:
    • The metadata files and ground-truth annotations for the video data are provided under Smart Home/Data. Due to the large size of the SmartHome-Bench dataset (1,203 videos), the raw video files are not included in this repository.
    • o To download the videos, please follow the instructions in the original SmartHome-Bench repository under the “Download Videos” section. Baseline methods are implemented following the same repository.
    • For ALARM LLM output generation, each LLM produces two files:
      • Step 1: Initial model responses, including Data Comprehension and Analytical Thinking.
      • Step 2: Refined outputs corresponding to the Reflection stage.
  4. Wound case study:
    • The wound dataset is fully provided in this repository.
    • The original dataset is sourced from Kaggle
    • For ALARM LLM output generation, the corresponding code is implemented in llm_gen.ipynb.

File Structure


ALARM
├── Smart Home
│   ├── Code
│   │   ├── LLM_output_generation
│   │   │   ├── Annotation_vad_1203.csv
│   │   │   ├── Baseline
│   │   │   ├── Claude_LLMChain_Step1.py
│   │   │   ├── Claude_LLMChain_Step2.py
│   │   │   ├── Flash_LLMChain_Step1.py
│   │   │   ├── Flash_LLMChain_Step2.py
│   │   │   ├── GPT_LLMChain_Step1.py
│   │   │   ├── GPT_LLMChain_Step2.py
│   │   │   ├── GPTmini_LLMChain_Step1.py
│   │   │   ├── GPTmini_LLMChain_Step2.py
│   │   │   ├── output_extraction.ipynb
│   │   │   ├── Pro_LLMChain_Step1.py
│   │   │   ├── Pro_LLMChain_Step2.py
│   │   │   └── rules_output
│   │   └── UQ_calculation
│   │       ├── All
│   │       ├── desc
│   │       ├── reas
│   │       ├── ref
│   │       └── smooth weight
│   │       └── cost
│   └── Data
│       ├── Trim_Videos
│       │   ├── Trim_video_label.csv
│       │   └── Video_trim.py
│       ├── Video_Annotation.csv
│       └── Video_url.csv
└── Wound
    ├── Code
    │   ├── LLM_output_generation
    │   │   ├── Baseline
    │   │   ├── llm_gen.ipynb
    │   │   └── output_extraction.ipynb
    │   └── UQ_calculation
    │       ├── All
    │       ├── desc
    │       ├── reas
    │       ├── ref
│       ├── smooth weight
│       ├── cost
    │       └── wound_groundtruth.xlsx
    └── Data


Reproducibility Workflow

To reproduce the results in Table 1
  • Data File: Smart Home/Data
  • Code File: Smart Home/Code/ LLM_output_generation, Smart Home/Code/ UQ_calculation/desc, Smart Home/Code/ UQ_calculation/reas, Smart Home/Code/ UQ_calculation/ref, Smart Home/Code/ UQ_calculation/All
  • Output: The performance results in Table 1
  • Run Time at the Above-Specified Computer Conditions: 14 hours
To reproduce the results in Figure 5
  • Data File: Smart Home/Data
  • Code File: Smart Home/Code/ UQ_calculation/desc, Smart Home/Code/ UQ_calculation/reas, Smart Home/Code/ UQ_calculation/ref, Smart Home/Code/ UQ_calculation/All
  • Output: The results under different P values in Figure 5
  • Run Time at the Above-Specified Computer Conditions: 2 hours
To reproduce the results in Figure 6
  • Data Files: Smart Home/Data
  • Code File: Smart Home/Code/ UQ_calculation/smooth weight
  • Output: The results of smooth weights
  • Run Time at the Above-Specified Computer Conditions: 1 minute
To reproduce the results in Figure 7
  • Data Files: N/A
  • Code File: Smart Home/Code/ UQ_calculation/cost and Wound/Code/ UQ_calculation/cost
  • Output: The results of optimal P vs. unit cost
  • Run Time at the Above-Specified Computer Conditions: 1 minute
To reproduce the results in Table 2
  • Data Files: Wound/Data
  • Code File: Wound/Code/ LLM_output_generation, Wound/Code/ UQ_calculation/desc, Wound/Code/ UQ_calculation/reas, Wound/Code/ UQ_calculation/ref, Wound/Code/ UQ_calculation/All
  • Output: The performance results in Table 2
  • Run Time at the Above-Specified Computer Conditions: 14 hours
To reproduce the results in Figure 10
  • Data Files: Wound/Data
  • Code File: Wound/Code/ UQ_calculation/desc, Wound/Code/ UQ_calculation/reas, Wound/Code/ UQ_calculation/ref, Wound/Code/ UQ_calculation/All
  • Output: The results under different P values in Figure 10
  • Run Time at the Above-Specified Computer Conditions: 2 hours
To reproduce the results in Figure 11
  • Data Files: Wound/Data
  • Code File: Wound/Code/ UQ_calculation/smooth weight
  • Output: The results of smooth weights
  • Run Time at the Above-Specified Computer Conditions: 1 minute

Cite

To cite the contents of this repository, please cite both the paper and this repository using their respective DOIs.

Article: https://doi.org/10.1287/ijds.2025.0107
Software and Data Repository: https://doi.org/10.1287/ijds.2025.0107.cd

License

Copyright (c) (2026 Zhang, Lin, Zhao, Guo, Li, Chen, Zhao, and Huang)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

INFORMS site uses cookies to store information on your computer. Some are essential to make our site work; Others help us improve the user experience. By using this site, you consent to the placement of these cookies. Please read our Privacy Statement to learn more.