  Known for their efficiency in analyzing large data sets, machine learning
classifiers are widely used in wide-field sky surveys. The upcoming Vera C.
Rubin Observatory Legacy of Time and Space Survey (LSST) will generate millions
of alerts every night, enabling the discovery of large samples of rare events.
Identifying such objects soon after explosion will be essential to study their
evolution. This requires a machine learning framework that makes use of all
available transient and contextual information. Using $\sim5400$ transients
from the ZTF Bright Transient Survey as input data, we develop NEEDLE, a novel
hybrid classifier to select for two rare classes with strong environmental
preferences: superluminous supernovae (SLSNe) preferring dwarf galaxies, and
tidal disruption events (TDEs) occurring in the centres of nucleated galaxies.
The input data includes detection and reference images, photometric information
from the alert packets, and host galaxy magnitudes from Pan-STARRS. Despite
having only a few tens of examples of the rare classes, our average (best)
completeness on an unseen test set reaches 77% (93%) for SLSNe and 72% (87%)
for TDEs. This may still result in a large fraction of false positives for the
rare transients, given the large class imbalance in real surveys. However, the
goal of NEEDLE is to find good candidates for spectroscopic classification,
rather than to select pure photometric samples. Our network is designed with
LSST in mind and we expect performance to improve further with the higher
resolution images and more accurate transient and host photometry that will be
available from Rubin. Our system will be deployed as an annotator on the UK
alert broker, Lasair, to provide predictions to the community in real time.
