# Domain Adaptation for Satellite-Borne Multispectral Cloud Detection
## 1 Introduction
### What Is the Domain Gap Problem? The domain gap refers to the difference between the distribution of _source-domain data_ (or simply source data, i.e., data used for training a model) and the distribution of _target-domain data_ (or simply target data, i.e., data encountered in the field). This gap arises from a shift in the target distribution relative to the source distribution, i.e.,  
* \(p_{t}(x)\) deviating from \(p_{s}(x)\) in what is known as the _covariate shift_,
* or less commonly, \(p_{t}(y)\) deviating from \(p_{s}(y)\), or \(p_{t}(x|y)\) deviating from \(p_{s}(x|y)\),  
where the subscripts \(s\) and \(t\) denote the source and target domains, \(x\) and \(y\) denote data and label, respectively. For a significant domain gap, a model that performs well on the source data may fail to generalise to target data; see Figure 1. The domain gap thus poses a fundamental problem that challenges the general performance of machine learning techniques. Figure 1: An illustration of the the multispectral domain gap problem. Every multispectral image is a multidimensional data point. A cloud detector maps each of these multidimensional data points to a binary cloudy/non-cloudy label. To facilitate visualisation, each image is represented by a two-dimensional data point. For images in the Sentinel-2 domain, for example, the left plot shows a hypothetical data distribution, based on whether a Sentinel-2-trained cloud detector classifies images as cloudy (‘x’) or noncloudy (‘o’). The Sentinel-2-trained cloud detector would, however, be poor at distinguishing the cloudy (‘x’) and noncloudy (‘o’) images distributed in the right plot, which visualises the hypothetical data distribution for Landsat 9. In the figure above, without domain adaptation, a Sentinel-2-trained cloud detector correctly classifies the sample cloudy image on the left but incorrectly classifies the sample cloudy image on the right. See Section 8.1 for quantitative results confirming the presence of multispectral domain gaps. Of interest in this article is the domain gap problem plaguing multi/hyperspectral imaging in EO missions. A multispectral imager is a digital imaging device that captures spectral data with more than three channels or bands of wavelengths [9]. A hyperspectral imager also uses more than three channels, but while a multispectral imager deals with spaced spectral bands, a hyperspectral imager deals with narrow spectral bands over a contiguous spectral range, producing a spectrum for every image pixel [10]. In the context of multi/hyperspectral imaging for EO missions, the domain gap can arise from such factors as the following:  
* Sensor variations: Significant variations in sensor characteristics can occur between different models, especially when newer models are typically designed to improve upon older ones. For example, the multispectral instrument for the Sentinel-2 mission was designed to provide continuity of data products from the Landsat and SPOT missions, but it has narrower spectral bands compared to those used in the Landsat and SPOT missions to limit the influence of atmospheric constituents [11]. Even sensors of the same build can exhibit variations in many aspects; these aspects are discussed in detail in Appendix A. * Environmental variations: Multi/hyperspectral measurements depend significantly on environmental conditions, and the conditions encountered during testing may not have been recorded in the training dataset. For example, plant phenotyping features in hyperspectral data vary with solar zenith angle, solar irradiation, temperature, humidity, wind speed and other environmental conditions [12]; these conditions may differ between the times when a plant feature prediction model is trained and when it is tested. * Nature of manufacturing: EO sensors including multi/hyperspectral imagers are specialised instruments typically manufactured in low volumes. Nontrivial variations can also occur across different builds of the same sensor model due to manufacturing irregularities.