  Ground-based $\gamma$-ray observatories, such as the VERITAS array of imaging
atmospheric Cherenkov telescopes, provide insight into very-high-energy (VHE,
$\mathrm{E}>100\,\mathrm{GeV}$) astrophysical transient events. Examples
include the evaporation of primordial black holes, gamma-ray bursts and flaring
blazars. Identifying such events with a serendipitous location and time of
occurrence is difficult. Thus, employing a robust search method becomes
crucial. An implementation of a transient detection method based on
deep-learning techniques for VERITAS will be presented. This data-driven
approach significantly reduces the dependency on the characterization of the
instrument response and the modelling of the expected transient signal. The
response of the instrument is affected by various factors, such as the
elevation of the source and the night sky background. The study of these
effects allows enhancing the deep learning method with additional parameters to
infer their influences on the data. This improves the performance and stability
for a wide range of observational conditions. We illustrate our method for an
historic flare of the blazar BL Lac that was detected by VERITAS in October
2016. We find a promising performance for the detection of such a flare in
timescales of minutes that compares well with the VERITAS standard analysis.
