# Conformal Test Martingale-Based Change-Point Detection for Geospatial Object Detectors
## 3 Method
### Accelerating Change-Point Detection with Momentum  
According to the existing research in the literature [23,24,29] and our empirical implementation, before the change point, \(S_{n}\) tends to decrease to a low value. As a result, after the change point, the \(S_{n}\) needs many steps to recover from the low value to the significant value \(c\) in Formula (2). To reduce the delay and accelerate the detection process, two methods based on the transformations of the original CTMs have been proposed. One method [23] is to restrict \(S_{n}\) such that it will not take values below some preset threshold. The other method [24] first sets \(S_{n}=1\) when there is not enough evidence available to reject the IID assumption, and then starts the process of conformal test martingales when the evidence is sufficient.  
To address this issue, we propose a novel transformation method considering the variation of the martingale values. The motivation of our method is from the observation that after the change point, the martingale values \(S_{n}\) tend to increase and exceed the value \(c\). To make this process efficient, we construct a transformation based on the idea that if the change in \(S_{n}\) is positive, one should make \(S_{n}\) increase faster, which can be realized using momentum [27]. Specifically, let \(\delta_{n}=S_{n}-S_{n-1}\) be the current change. To bring in the idea of momentum, one can employ a new process \(S_{n}^{*}\) with the following iteration equations:  
\[\delta_{n}^{*} =\delta_{n}+r_{n}\times\delta_{n-1}^{*},\] \[S_{n}^{*} =S_{n-1}^{*}+\delta_{n}^{*},\]  
where \(r_{n}\) is the momentum parameter of the iterations. However, this performs poorly since the momentum both accelerates the increases and decreases of the original \(S_{n}\) and \(S_{n}^{*}\) can also be a small value. Therefore, we introduce Algorithm 2 below, where \(a\lor b=\max\{a,b\}\) and \(S_{n}^{*}\) only concentrates on the non-negative part of the momentum. Also, \(S_{n}^{*}\) is always no less than \(S_{0}\) for all \(n\).  
```
0: The \(p\)-values \(p_{1},p_{2},\ldots\) defined by Formula (1), the momentum parameters \(r_{1},r_{2},\ldots\) and the parameter \(J\).
0: The transformation process \(S_{1}^{*},S_{2}^{*},\ldots\).
1: Set \(S_{0}=1\), \(C_{-1}=C_{0}=C_{1}=\frac{1}{3}\), \(C=1\), \(S_{0}^{*}=1\) and \(\delta_{0}^{*}=0\).
2:for\(n=1,2,\ldots\)do
3: Calculate \(\delta_{n}\) using Algorithm 1.
4: Calculate \(\delta_{n}^{*}=\delta_{n}+r_{n}\times(\delta_{n-1}^{*}\lor 0)\).
5: Obtain \(S_{n}^{*}=(S_{n-1}^{*}+\delta_{n}^{*})\lor 5_{0}\).
6:endfor
```  
**Algorithm 2** The transformation of conformal test martingale with momentum.  
This transformation in Algorithm 2 can significantly accelerate the detection speed if the momentum parameters are chosen or calculated properly. Based on the experimental observation that the rolling mean of the \(p\)-values are close to or far away from 0.5 before or after the change point, we further propose a method to calculate \(r_{n}\) with \(p\)-values in Section 4.2. Although the output of Algorithm 2 is not a martingale theoretically, which might violate the validity of the original CTM, our experiments empirically demonstrate the practicability and efficiency of this method for fast change-point detection.