{"id":31699404,"url":"https://github.com/rishishanthan/anomaly-detection-autoencoders","last_synced_at":"2026-05-14T12:33:20.424Z","repository":{"id":318588233,"uuid":"1071922501","full_name":"rishishanthan/anomaly-detection-autoencoders","owner":"rishishanthan","description":"Anomaly detection with Dense, LSTM, and Conv1D autoencoders — reconstruction error, adaptive thresholds, ROC/PR analysis, and error heatmaps.","archived":false,"fork":false,"pushed_at":"2025-10-08T02:49:28.000Z","size":2163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T04:19:38.115Z","etag":null,"topics":["ae","anomaly-detection","autoencoder","conv1d","deep-learning","lstm-autoencoder","pytorch","reconstruction-error","time-series","unsupervised-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rishishanthan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-08T02:26:17.000Z","updated_at":"2025-10-08T02:49:32.000Z","dependencies_parsed_at":"2025-10-08T04:29:43.592Z","dependency_job_id":null,"html_url":"https://github.com/rishishanthan/anomaly-detection-autoencoders","commit_stats":null,"previous_names":["rishishanthan/anomaly-detection-autoencoders"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rishishanthan/anomaly-detection-autoencoders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Fanomaly-detection-autoencoders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Fanomaly-detection-autoencoders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Fanomaly-detection-autoencoders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Fanomaly-detection-autoencoders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishishanthan","download_url":"https://codeload.github.com/rishishanthan/anomaly-detection-autoencoders/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Fanomaly-detection-autoencoders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33025043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ae","anomaly-detection","autoencoder","conv1d","deep-learning","lstm-autoencoder","pytorch","reconstruction-error","time-series","unsupervised-learning"],"created_at":"2025-10-08T19:43:21.701Z","updated_at":"2026-05-14T12:33:20.417Z","avatar_url":"https://github.com/rishishanthan.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anomaly Detection with Autoencoders (Dense, LSTM, Conv1D)\n\nThree autoencoder variants for detecting anomalies using **reconstruction error**:\n- **Dense AE** for tabular signals\n- **LSTM AE** for sequential data\n- **Conv1D AE** for local temporal patterns\n\nThe notebook provides a clean, comparative pipeline with reproducible metrics and visual diagnostics.\n\n---\n\n## 🔍 Approach\n1) **Data prep** (windowing/standardization if time series)\n2) **Train AEs** on normal data (or normal-heavy data)\n3) **Compute reconstruction error** on val/test\n4) **Choose threshold** (e.g., val quantile, Youden’s J, or F1-max)\n5) **Evaluate**: ROC-AUC, PR-AUC, Accuracy, F1; visualize error distributions\n6) **Explain errors**: overlay recon vs. original; error heatmaps\n\n---\n\n## 🧠 Models\n- **Dense AE**: MLP encoder/decoder with bottleneck (e.g., 128→32→128)\n- **LSTM AE**: Encoder LSTM → bottleneck → Decoder LSTM\n- **Conv1D AE**: Temporal conv blocks + upsampling/transposed conv\n\n**Loss:** MSE  \n**Optimizer:** Adam (lr=1e-3)  \n**Regularization:** Dropout/weight decay as needed  \n**Early stopping** on val reconstruction loss\n\n---\n\n## 📌 Insights\n- Picking threshold on validation avoids test leakage\n- LSTM AE shines with temporal drift; Conv1D with local bursts\n- Robust standardization and window size are key hyperparameters\n\n---\n\n## 📊 Results\nAll the results from my run which of test, train, validation reults including data analysis and corellations are in notebook.\n\n---\n\n## 📁 Dataset\nThe dataset I used in the folder called 'NAB'. There are many other datasets in the folder, which can be tried out for improvement and practice purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishishanthan%2Fanomaly-detection-autoencoders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishishanthan%2Fanomaly-detection-autoencoders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishishanthan%2Fanomaly-detection-autoencoders/lists"}