Year: 2025
Type: article
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
Author: Okonta Samson Iwenyan
Institution: Mountain Top University
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: bronze
OpenAlex ID: W7117889704
FWCI:
Cites:
Cited by:
Related to:
