1. Introduction
The rapid development of commercial unmanned vehicles, also referred to as drones, has impacted various industries such as logistics, agriculture, film, and inspection. However, this proliferation has also introduced security risks for critical infrastructure. In U.S. policy, critical infrastructure is formally defined under the 2024 National Security Memorandum on Critical Infrastructure Security and Resilience (NSM-22), which reaffirms the sixteen sectors originally identified by Presidential Policy Directive 21, including chemical facilities, commercial facilities, communications, critical manufacturing, dams, defense industrial base, emergency services, energy, financial services, food and agriculture, government facilities, healthcare and public health, information technology, nuclear reactors and materials, transportation systems, and water and wastewater systems, as assets, systems, and networks whose incapacitation or destruction would have a debilitating effect on national security, economic security, public health, or safety [
1]. Residential buildings, however densely populated, fall outside this designated set; this study targets the nuclear reactors and materials sector specifically, where unauthorized drone access carries operational and physical consequences distinct from civilian density risk. The unauthorized use of drones over such facilities, for surveillance, transport of harmful payloads, or disruption of operations, has become a documented operational concern. The unauthorized use of drones includes surveillance, transportation of harmful substances, or disruption of operations. The affordability and accessibility of commercial drones have enabled malicious actors to exploit them for unauthorized purposes, presenting a significant challenge for security professionals worldwide [
2]. In 2024, the U.S. Nuclear Regulatory Commission updated its regulations to mandate that nuclear power plant licensees report drone sightings over their facilities [
3], and over 350 unauthorized drone incursions were documented across more than 100 U.S. military installations within a single year [
4].
In the past, drones were located through the use of radar detection, analysis of radio signals, acoustic signatures, and computer vision. While these approaches have had varying degrees of success, each of these approaches has a major limitation. Radar detection is difficult for drones flying low, especially if they are small. The drone also needs to be transmitting signals for the radio signal detection to work. It does not work for drones that are already set to fly autonomously. Acoustic detection is difficult because of the noise from the outside world. It does not work very well at a distance. Weather and camera coverage are big factors in how well you can see things. Recent comprehensive surveys have cataloged the strengths and limitations of each modality in detail [
5,
6]. Therefore, a new means of detection is being developed, focusing on how drones behave. More broadly, machine learning and artificial intelligence techniques have demonstrated significant potential across intelligent transportation and infrastructure protection systems [
7], motivating their application to drone trajectory analysis.
A complementary approach is to analyze changes in a drone’s flight pattern over time. The underlying idea is that anomalous drone flights differ from nominal ones. For a delivery drone, nominal flights are efficient point-to-point routes; for a survey drone, nominal flights are regular grid patterns; for a recreational drone, nominal flights are loosely structured but stay clear of restricted airspace. Anomalous patterns, in contrast, include sustained loitering near protected zones, straight-line approaches toward a restricted area, and evasive zigzag patterns intended to avoid detection. Anomaly detection learns the statistical envelope of nominal flights and uses it to identify departures from that envelope, which may indicate a threat.
Anomaly detection using variational autoencoders (VAEs) [
8,
9] provides an unsupervised alternative for learning to detect anomalies from non-anomalies. Unlike supervised autoencoders that are trained from examples of anomalous inputs, standard VAEs do not necessarily have to train on anomalous samples. However, typically, fully connected architectures are used, which treat trajectories as feature vectors (i.e., losing the temporal nature of flight paths). Anomalous behaviors (e.g., sudden changes in speed, reversing heading, approaching then retreating, vertiginous movements to which the drone has no business losing itself, etc.) evolve as temporal patterns, and are hence beyond what static feature representations might capture. LSTMs [
10] leverage a simple gating mechanism to encode memory of long-range temporal dependencies. Their architecture, applied to the encoder in the VAE paradigm, provides a principled way of enriching latent representation learning with temporal knowledge.
This paper takes a benchmarking-first approach to drone trajectory anomaly detection. Rather than asserting the superiority of any single architecture, we systematically compare three VAE variants and three non-VAE baselines under identical conditions to identify which architectural property, variational regularization, temporal encoding, or bidirectionality, drives detection performance. Building on the empirical findings of this benchmark, we then introduce a domain-aware LSTM-VAE that incorporates facility-specific architectural elements designed to address the geometric, kinematic, and regulatory characteristics of trajectory data near a protected site, responding to the observation that generic VAE-LSTM architectures lack mechanisms tailored to airspace protection contexts.
Our contributions are as follows: (i) a rigorous multi-seed benchmark of six anomaly detection methods (bidirectional LSTM-VAE, unidirectional LSTM-VAE, fully connected VAE, standard autoencoder, One-Class SVM, and Isolation Forest), evaluated on identical raw trajectory features with consistent training pipelines and explicit GPU-RNG seeding for reproducibility; (ii) an empirical attribution of the performance gap to variational regularization rather than bidirectionality or LSTM-specific temporal encoding, demonstrated by the near-equivalent AUC of all three VAE variants and the consistent gap to non-VAE baselines; (iii) a domain-aware LSTM-VAE that incorporates a polar coordinate input representation and a distance-weighted reconstruction loss tailored to the geometric and operational characteristics of facility protection scenarios, providing a measurable improvement over generic VAE methods at no additional parameter cost; (iv) a deployment-realistic evaluation under 99:1 class imbalance via a 1000-iteration bootstrap, characterizing precision at low FPR operating points relevant to security operations; (v) an augmented hard anomaly test set with four additional threat classes (subtle far-loitering, delayed approach, path mimicking, and multi-segment coordinated approaches) to probe robustness beyond the original taxonomy.
The remainder of this paper is organized as follows:
Section 2 reviews related work,
Section 3 describes our methodology,
Section 4 details the experimental setup,
Section 5 presents results,
Section 6 provides discussion, and
Section 7 concludes with future directions.
3. Methodology
3.1. Problem Formulation
Let us say that the drone’s trajectory is
which is made up of L sequential observations. Each observation
has F features that describe the drone’s kinematic state at time t. The goal of the anomaly detection task is to learn a scoring function f:
The scoring function
maps a complete trajectory to a non-negative real-valued anomaly score, where larger values indicate greater dissimilarity from the normal training distribution. Concretely, in our LSTM-VAE realization, f(T) is the mean squared reconstruction error between the input trajectory T and its reconstruction
produced by the encoder–decoder pair (defined in
Section 3.4, Equation (15)). The function f is trained using only normal trajectory examples, consistent with the one-class classification paradigm appropriate for security applications where comprehensive examples of anomalous behavior are not available at training time. Formally, given a training set,
of N normal trajectories, we seek to learn model parameters θ such as for a threshold (τ):
We usually find the threshold τ by looking at a validation set of normal trajectories that we set aside. This is usually done by looking at the score distribution’s percentile. This method makes sure that the threshold is set without using examples that are out of the ordinary, which is what would happen in real life.
Every trajectory observation has 12 features that show both kinematic properties and how the protected infrastructure is related to other things. The feature set is meant to give a lot of information for finding anomalies without adding engineered temporal features, which could give some model architecture an unfair edge or disadvantage.
The full feature vector is made up of four groups of three dimensions at each time step. The x-coordinate (horizontal distance in meters from the center of the arena), the y-coordinate (lateral distance in meters from the origin of the arena), and the z-coordinate (altitude in meters above ground level) are all part of the position features. The x-direction velocity component vx, the y-direction velocity component vy, and the vertical velocity vz are all measured in meters per second. From these, we can find three derived kinematic features: speed, which is the size of the velocity vector
heading, which is the horizontal travel direction in radians; and acceleration magnitude, which is the rate of change in speed. Lastly, three facility-relative features show how far away the protected zone is from the facility: the Euclidean distance to the facility center, the approach rate (the time derivative of distance, where negative values mean approach), and the heading-to-facility angle, which is the angle between the current heading and the direction of the facility.
This feature set collects important data that can be used to tell the difference between normal and abnormal behavior while still allowing for a fair comparison between temporal and non-temporal models. We do not include pre-computed temporal statistics like heading variance or path curvature, which would give non-temporal models “leaked” sequential information.
3.2. LSTM-VAE Architecture
Our proposed LSTM-VAE architecture integrates bidirectional LSTM encoding with variational inference to acquire temporal representations of drone trajectories. The architecture has an encoder network that turns input sequences into latent distributions and a decoder network that turns latent samples into trajectories. The architecture is illustrated in
Figure 1 below.
Encoder Architecture: The encoder takes the input sequence
and processes it through a series of fully connected and recurrent layers. The sequence input layer first takes in input with the shape
which means that there are 12 features over 100 timesteps. The next step is to pass this sequence through a bidirectional LSTM layer with 128 units [
24]. This layer processes the data in both directions to create hidden states that capture bidirectional temporal context. The output shape is (256 × 100). For regularization, a 30% dropout layer [
33] is used. Then, a unidirectional LSTM layer with 128 units processes the sequence even more and only outputs the last hidden state as a fixed-length 128-dimensional representation. A dropout layer with an extra 30% helps to keep things regular. The resulting representation then goes through two fully connected layers: the first one has 256 units, and the second one has 128 units. Both use layer normalization [
34] and LeakyReLU activation (α = 0.1). A final latent projection layer gives 2d = 64 values that stand for μ and log σ
2 for a d = 32-dimensional latent space. The complete layer-by-layer encoder and decoder specification is summarized in
Table 2.
Decoder Architecture: The decoder takes the latent sample
and builds the flattened trajectory
from it. A latent input layer takes in a latent vector with d = 32 dimensions. This vector is then passed through three fully connected layers, each with 128, 256, and 512 units, respectively. Each layer uses layer normalization and LeakyReLU activation. The last output projection layer maps to 1200 units, which creates the reconstructed flattened trajectory with dimensions
3.3. Training Objective
The model is trained to maximize the evidence lower bound (ELBO), which provides a tractable lower bound on the log-likelihood of the data:
The first term represents the reconstruction likelihood, implemented as negative mean squared error between the input and reconstructed trajectory, it rewards the decoder for producing reconstructions close to the original. The second term is the Kullback–Leibler (KL) divergence, an information-theoretic measure of dissimilarity between two probability distributions defined as
which is zero when the distributions are identical and grows as they diverge. In our setting, this divergence is computed between the approximate posterior
and the standard normal prior
which has a closed-form solution for Gaussian distributions. The combined objective is known as the evidence lower bound (ELBO): maximizing it pushes the encoder to produce a latent posterior that is both informative for reconstruction (low MSE) and well-regularized toward a standard normal prior (low KL). The hyperparameter β balances these two goals, small β prioritizes reconstruction fidelity, large β prioritizes a smooth, well-organized latent space.
We employ β-VAE annealing [
20] to prevent posterior collapse, a common failure mode where the model ignores the latent space and relies solely on the decoder. The annealing schedule linearly increases β from 0 to β_max = 0.5 over the first 40 epochs, allowing the model to first learn useful reconstructions before gradually enforcing latent space regularization.
3.4. Anomaly Scoring
At inference time, the anomaly score for a trajectory T is computed as the mean squared reconstruction error:
Trajectories with scores exceeding a threshold τ are classified as anomalous. The threshold is determined from the validation set as the 95th percentile of reconstruction errors, ensuring that approximately 5% of normal trajectories would be flagged (corresponding to a 5% false positive rate on the validation distribution).
3.5. Baseline Methods
We compare our bidirectional LSTM-VAE to a unidirectional LSTM-VAE variant and four additional baselines that use different ways to find anomalies. Fully Connected VAE (FC-VAE): In this model, we use an encoder–decoder type architecture in which the input of the encoder and output of a decoder is on flattened trajectory vectors. The sizes of the encoder layers are 512, 256, 128, 64 respectively, and the decoder architecture is symmetric. This is a baseline to test whether the effect of the variational (rather than temporal) modeling per se is significant, or its temporal nature adds more appeal. Standard Autoencoder: This autoencoder has the same architecture as the last model but does not have the VAE part. Therefore, the second model disentangles the contribution of variational inference from the standard autoencoding. One-Class SVM (OC-SVM) OC-SVM is a standard method for one-class classification [
35]. We use an RBF kernel and let the implementation automatically select a best scale, based on the median pairwise distances. OC-SVM learns a decision boundary from the normal data in kernel “space” that encloses the normal distribution according to a learned Laplacian ball, selecting points as anomalies outside of this boundary. Isolation Forest is an ensemble baseline, which uses 100 trees of approximately depth 64, which detect anomalies given recursively random partitioned decision trees. This method makes use of the characteristic that outlier points are few and different, therefore requiring few such random “splits” to detect them. In this method, we set the contamination parameter to 5%, so that it harmonizes with the behavior of most of the other methods (in terms of threshold selection).
3.6. Domain-Aware LSTM-VAE
The generic LSTM-VAE described in
Section 3.2 treats trajectory features in their raw Cartesian-derived form and weights every timestep equally in the reconstruction loss. Neither choice reflects the operational structure of facility protection scenarios, where (a) anomaly is a function of relative position with respect to a known protected site, and (b) reconstruction fidelity at near-facility timesteps carries greater operational significance than fidelity at distant timesteps. We propose two architectural modifications that introduce these inductive biases without altering the encoder–decoder topology, layer dimensions, or hyperparameters of the baseline LSTM-VAE.
Polar Coordinate Input Representation: The 12 raw input features are replaced by 12 polar features expressed relative to the facility center—radial distance r, azimuth components sin θ and cos θ (decomposed to avoid the ±π wraparound discontinuity), altitude z, radial velocity ṙ, tangential velocity r, vertical velocity ż, heading error angle (between velocity and the inward radial direction), speed magnitude, an inverse distance proximity score 1/(1 + r/r0), acceleration magnitude, and radial acceleration . The feature count is preserved at 12 to ensure the encoder–decoder architecture remains identical to the baseline; only the geometric basis of the input changes. This representation makes facility-relative quantities first-class inputs rather than implicit features that the network must derive from absolute coordinates.
Distance-weighted reconstruction loss. The baseline reconstruction loss is the unweighted mean squared error
The domain-aware variant replaces it with a per-timestep distance-weighted form
where
with α = 1.0 and r
0 = 200 m. The per-timestep weight ranges from 1 (far from the facility) to 2 (at the facility center), allocating effective model capacity toward reconstructing trajectory segments that lie near the protected zone. The KL divergence term is unchanged. At inference, anomaly scores use the unweighted MSE, ensuring AUC-ROC values remain directly comparable to the baseline LSTM-VAE.
The two modifications together require no additional learnable parameters and preserve the baseline’s training schedule, latent dimension, and regularization configuration.