  Gravitational wave (GW) detection is of paramount importance in fundamental
physics and GW astronomy, yet it presents formidable challenges. One
significant challenge is the removal of noise transient artifacts known as
``glitches," which greatly impact the search and identification of GWs. Recent
research has achieved remarkable results in data denoising, often using
effective modeling methods to remove glitches. However, for glitches from
uncertain or unknown sources, current methods cannot completely eliminate them
from the GW signal. In this work, we leverage the inherent robustness of
machine learning to obtain reliable posterior parameter distributions directly
from GW data contaminated by glitches. Our network model provides reasonable
and rapid parameter inference even in the presence of glitches, without needing
to remove them. We also investigate various factors affecting the rationality
of parameter inference in our normalizing flow network, including glitch and GW
parameters. The results demonstrate that the normalizing flow can reasonably
infer the source parameters of GWs even with unknown contamination. We find
that the nature of the glitch itself is the only factor that can affect the
rationality of the inferred results. With improvements to our model, we
anticipate accelerating the localization of electromagnetic counterparts and
providing priors for more accurate deglitching, thereby speeding up subsequent
data processing procedures.
