# SMM: Leveraging Metadata for Contextually Salient Multi-Variate Motif Discovery
## 3 Problem Definition
### Uni-Variate Motifs and Local Saliency
,\]  
_where_  
* \(\mathcal{S}_{c,l}^{*}\) _is a sub-sequence of double length, centered at the same time instance as_ \(\mathcal{S}\) _(i.e.,_ \(\text{center}(\mathcal{S})=\text{center}(\mathcal{S}^{\top})\)_);_
* \(\text{half}()\) _is a function that subsamples a time series into half its length._  
Intuitively, high local salience of a subsequence \(\mathcal{S}\) implies that it is well defined in (in the sense of being different from) its temporal neighborhood (Figure 4). Note that this definition is very general and does not impose any constraints on the nature of the \(\Delta\) function or the lengths of the subsequences. Then, a _locally salient_ subsequence has the highest local salience value in its immediate neighborhood in time and temporal scale. **Definition 4** (Locally Salient Subsequence). : _Let subsequence \(\mathcal{S}_{c,l}=(d_{i},d_{i+1},...,d_{j})\) of a time series \(\mathcal{T}\) be such that \(c=\text{center}(\mathcal{S})\) and \(l=\text{length}(\mathcal{S})\). \(\mathcal{S}_{c,l}\) is said to be a locally salient subsequence if_  
\[ls(\mathcal{S}_{c,l})>MAX\begin{cases}ls(\mathcal{S}_{c,l}^{*}),&(\mathcal{S}_{c,l}^{*}),&ls(\mathcal{S}_{c+1,l}^{* \(\mathcal{S}^{*}=double(S^{\perp})\)_;_
* \(\mathcal{S}^{+}=half(S^{\top})\)_;_
* \(\mathcal{S}^{\top}\) _is a sub-sequence of double length, centered at the same time instance as_ \(\mathcal{S}\) _(i.e., center_\((\mathcal{S})=center(\mathcal{S}^{\top})\)_);_
* \(\mathcal{S}^{\perp}\) _is a sub-sequence of half length, centered at the same time instance as_ \(\mathcal{S}\)_;_
* \(double()\) _is a function that supersamples a time series into double length;_
* \(half()\) _is a function that subsamples a time series into half its length._  
Intuitively, a subsequence is locally salient if it has the highest local salience value among all its neighboring subsequences in time and scale. Given this, we now can define recurring sub-sequences that are _locally salient with respect to their temporal contexts_.  
**Definition 5** (Recurring LS-Pattern).: _A locally salient sub-sequence \(\mathcal{S}_{0}\) of a time series \(\mathcal{T}\) of length \(l\leq N\) is said to be a \((k,l,\epsilon)\)-recurring locally salient (LS) sub-sequence, relative to a distance function \(\Delta\), if there are \(k-1\) other locally salient sub-sequences \(\mathcal{S}_{1},\ldots,\mathcal{S}_{k-1}\) of \(\mathcal{T}\) such that_  
\[\forall_{1\leq i\leq k-1}\Delta(\mathcal{S}_{0},\mathcal{S}_{i})\leq\epsilon\]  
_and, for all \(0\leq i\leq k-1\), \(\mathcal{S}_{i}\)\(length(\mathcal{S}_{i})\geq l\). Then, the set \(recPat=\{\mathcal{S}_{0},\ldots,\mathcal{S}_{k-1}\}\) is referred to as a \((k,l,\epsilon)\)-recurring LS-pattern._  
This leads us to the definition of locally salient motifs on univariate time series. **Definition 6** (LS-Motif). : _Let the set \(recPat=\{\mathcal{S}_{0},\ldots,\mathcal{S}_{k-1}\}\) be a \((k,l,\epsilon)\)-recurring LS-pattern of time series \(T\). We refer to this as a \((k,l,\epsilon)\) LS-Motif if the set is maximal, i.e., there is no \((k^{\prime},l,\epsilon)\)-recurring LS-pattern \(recPat^{\prime}\) such that \(k^{\prime}>k\) and \(recPat^{\prime}\supset recPat\)._  
Note that, if a motif is locally salient with respect to its local temporal context, then it is not only maximal in terms of the size of the set of repeating patterns, but it is also well defined in its immediate temporal neighborhood.