  To evaluate the probability of a gravitational-wave candidate originating
from noise, GstLAL collects noise statistics from the data it analyzes.
Gravitational-wave signals of astrophysical origin get added to the noise
statistics, harming the sensitivity of the search. We present the Background
Filter, a novel tool to prevent this by removing noise statistics that were
collected from gravitational-wave candidates. To demonstrate its efficacy, we
analyze one week of LIGO and Virgo O3 data, and show that it improves the
sensitivity of the analysis by 20-40% in the high mass region, in the presence
of 868 simulated gravitational-wave signals. With the upcoming fourth observing
run of LIGO, Virgo, and KAGRA expected to yield a high rate of
gravitational-wave detections, we expect the Background Filter to be an
important tool for increasing the sensitivity of a GstLAL analysis.
