  Transient signals of instrumental and environmental origins ("glitches") in
gravitational wave data elevate the false alarm rate of searches for
astrophysical signals and reduce their sensitivity. Glitches that directly
overlap astrophysical signals hinder their detection and worsen parameter
estimation errors. As the fraction of data occupied by detectable astrophysical
signals will be higher in next generation detectors, such problematic overlaps
could become more frequent. These adverse effects of glitches can be mitigated
by estimating and subtracting them out from the data, but their unpredictable
waveforms and large morphological diversity pose a challenge. Subtraction of
glitches using data from auxiliary sensors as predictors works but not for the
majority of cases. Thus, there is a need for nonparametric glitch mitigation
methods that do not require auxiliary data, work for a large variety of
glitches, and have minimal effect on astrophysical signals in the case of
overlaps. In order to cope with the high rate of glitches, it is also desirable
that such methods be computationally fast. We show that adaptive spline
fitting, in which the placement of free knots is optimized to estimate both
smooth and non-smooth curves in noisy data, offers a promising approach to
satisfying these requirements for broadband short-duration glitches, the type
that appear quite frequently. The method is demonstrated on glitches drawn from
three distinct classes in the Gravity Spy database as well as on the glitch
that overlapped the binary neutron star signal GW170817. The impact of glitch
subtraction on the GW170817 signal, or those like it injected into the data, is
seen to be negligible.
