Semantic anomaly detection using vector databases

Traditional anomaly-detection systems rely on statistical thresholds, rule-based matching, or supervised learning, but they often fail to capture semantic relationships embedded in high-dimensional scientific and environmental datasets. With the rise of deep learning, high-dimensional vector embeddings have emerged as a powerful representation for encoding contextual relationships between data points. Vector databases are explicitly designed to store and retrieve these embeddings efficiently using Approximate Nearest Neighbor (ANN) search structures such as HNSW and IVF. This study evaluated semantic anomaly detection using PostgreSQL-pgvector and compared it to classical relational anomaly detection implemented in standard PostgreSQL. A dataset of 100,000 environmental sensor readings (temperature, humidity, CO₂, VOC, and PM2.5) was transformed into embeddings using a transformer-based encoder. Anomaly detection was performed by measuring vector distances between incoming observations and the semantic neighborhood of historical data. Results showed that vector-based retrieval achieved 94.6% anomaly-detection accuracy compared to 62.3% for rule-based and 74.1% for statistical Z-score methods. Query latency improved from 242 ms (RDBMS scan) to 14 ms using pgvector HNSW indexing. The findings demonstrated that vector databases enable semantically aware, scalable anomaly detection for scientific and environmental monitoring systems

Authors

Publication Details

Journal
Journal of ICT Development Applications and Research
Published
2025-12-31
DOI
https://doi.org/10.47524/jictdar.v7i2.86
Primary Topic
Anomaly Detection Techniques and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Semantic anomaly detection using vector databases

Okonta Samson Iwenyan
Journal of ICT Development Applications and Research
Anomaly Detection Techniques and Applications
article

Semantic anomaly detection using vector databases

Okonta Samson Iwenyan
article en

Abstract

Traditional anomaly-detection systems rely on statistical thresholds, rule-based matching, or supervised learning, but they often fail to capture semantic relationships embedded in high-dimensional scientific and environmental datasets. With the rise of deep learning, high-dimensional vector embeddings have emerged as a powerful representation for encoding contextual relationships between data points. Vector databases are explicitly designed to store and retrieve these embeddings efficiently using Approximate Nearest Neighbor (ANN) search structures such as HNSW and IVF. This study evaluated semantic anomaly detection using PostgreSQL-pgvector and compared it to classical relational anomaly detection implemented in standard PostgreSQL. A dataset of 100,000 environmental sensor readings (temperature, humidity, CO₂, VOC, and PM2.5) was transformed into embeddings using a transformer-based encoder. Anomaly detection was performed by measuring vector distances between incoming observations and the semantic neighborhood of historical data. Results showed that vector-based retrieval achieved 94.6% anomaly-detection accuracy compared to 62.3% for rule-based and 74.1% for statistical Z-score methods. Query latency improved from 242 ms (RDBMS scan) to 14 ms using pgvector HNSW indexing. The findings demonstrated that vector databases enable semantically aware, scalable anomaly detection for scientific and environmental monitoring systems

Journal of ICT Development Applications and ResearchVol. 7(2)
Quality Education
Openalex Percentile: Top 17%
Anomaly Detection Techniques and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.