|
Download README.md from thu-sail-lab/Anlu: direct link, hf CLI and curl.
- Browser
- Download file 3.46 kB
-
https://huggingface.co/thu-sail-lab/Anlu/resolve/main/README.md
- Command line
-
hf download hf://thu-sail-lab/Anlu/README.md
-
curl -L -o README.md https://huggingface.co/thu-sail-lab/Anlu/resolve/main/README.md
3.46 kB
| license: apache-2.0 | |
| library_name: pytorch | |
| tags: | |
| - time-series | |
| - anomaly-detection | |
| - reference-conditioned | |
| - univariate | |
| # Anlu — s38000 inference weights | |
| Anlu is a pretrained reference-conditioned time-series anomaly detector. It | |
| uses a normal reference prefix to interpret a query and returns one anomaly | |
| score per query timestamp. Model weights stay frozen at inference time. | |
| This release contains the existing **s38000** checkpoint as Safetensors. | |
| All **331 tensors** are preserved bit for bit; optimizer state and training | |
| paths are omitted. Both encoders, the reference resampler, adapters, and output | |
| heads are included, so no separate foundation checkpoint is needed. | |
| ## Files | |
| | File | Description | | |
| |---|---| | |
| | `model.safetensors` | 94,863,243 parameters, 379,487,836 bytes | | |
| | `config.json` | Architecture and fixed inference settings | | |
| | `weights_manifest.json` | Checkpoint and export hashes | | |
| Checkpoint SHA256: | |
| ```text | |
| aad7c29293665fc9c6dbed7db2798cf9d1986ba4fc53694d1bd2c7e9f90388d8 | |
| ``` | |
| ## Use with TSB-AD | |
| Use a TSB-AD checkout containing the Anlu integration: | |
| ```bash | |
| pip install -e /path/to/TSB-AD | |
| pip install "torch>=2.1" "safetensors>=0.4" "huggingface_hub>=0.23" | |
| ``` | |
| ```python | |
| from TSB_AD.models.Anlu import Anlu | |
| # Arrays have shape [time, 1]. No labels are supplied to the model. | |
| detector = Anlu(device="cuda:0") | |
| detector.fit(normal_prefix) | |
| scores = detector.decision_function(query) | |
| ``` | |
| For offline use, download this repository and pass | |
| `checkpoint="/path/to/model.safetensors"`, or set `ANLU_CHECKPOINT` to that file. | |
| The loader verifies the fixed checkpoint hash before constructing the model. | |
| ## Evaluation protocol | |
| The fixed s38000 configuration uses 10,000-point query windows, stride 1,500, | |
| window batch size 8, and the first min(10,000, prefix length) reference points. | |
| Full-query mean and population standard deviation are shared by the query and | |
| reference. Standard deviation has a 1e-4 floor. Outputs are raw anomaly-class | |
| minus normal-class logits, averaged over covering query windows. A backward | |
| tail window contributes only the previously uncovered suffix. | |
| TSB-AD-U Eva350 is evaluated on each **complete series**, including its normal | |
| prefix. Evaluation labels are used only for metrics. The detector does not | |
| fine-tune, select thresholds, or change parameters for individual datasets. | |
| This release is validated for **univariate** inputs. It requires a useful normal | |
| reference prefix and evaluates complete observed queries; it is not a causal | |
| streaming detector. Scores are ranking signals, not calibrated probabilities. | |
| ## Reproducibility | |
| The accompanying TSB-AD integration includes the self-contained architecture, | |
| the semisupervised dispatcher entry, fixed univariate hyperparameters, tests, | |
| and an Eva350 command. Release verification compares predictions against the | |
| original s38000 evaluation on all 350 records. Published VUS-PR uses 250 | |
| thresholds and the current TSB-AD `find_length_rank(..., rank=1)` metric-window | |
| rule. Historical results using a different window fallback rule are kept as | |
| a separate reproduction check. | |
| ## Verified result | |
| On the official 350-file TSB-AD-U evaluation list, Full-series VUS-PR is | |
| **0.599280663 (59.9281%)** with the current upstream metric-window rule and | |
| 250 thresholds. This is an unweighted mean over the 350 records. The original | |
| score vectors are reproduced within numerical tolerance; exporting the weights | |
| does not change their tensor values. | |