## 4 Methods for Manipulation Protection and Detection
### Span  
SPAN [46] (Spatial Pyramid Attention Network) is an architecture designed to enhance manipulation localization by effectively capturing dependencies between points and objects at various scales, utilizing self-attention mechanisms [47; 48; 49].  
SPAN offers an improved interpretation of spatial relationships within an image, resulting in more precise manipulation detection compared to ManTra-Net. While ManTra-Net primarily focuses on analyzing the same image points across different scales of the feature map, it does not account for spatial dependencies between different regions of the image. SPAN builds upon this approach by modeling both inter-scale relationships through multi-scale information propagation and spatial dependencies between image regions using a self-attention module. This capability allows SPAN to capture complex patterns and relationships within the image more effectively, leading to more accurate manipulation localization. The SPAN architecture consists of three main components: a feature extractor, a spatial pyramid attention block, and a decision module--see Figure 3. The self-attention module aims to establish relationships between different parts of the image, enabling the network to capture both local and global context. The first stage of processing in the described architecture is the feature extractor. The authors utilized a pre-trained network from ManTra-Net, trained on synthetic data based on images from the Dresden Image Database [50]. This training employed supervised classification, covering 385 types of image manipulations. To streamline subsequent processing, the output from the feature extractor is passed through a 1 \(\times\) 1 convolutional layer, reducing the feature depth from 256 (as in ManTra-Net) to 32. This enables faster data propagation through the self-attention modules, which are organized into five cascaded layers analyzing featuresprogressively from the most local to the most global. Each step employs a self-attention module with an increasing dilation parameter (1, 3, 9, 27, 81) and a convolutional layer to normalize the output channels back to 32.  
This approach efficiently captures dependencies at various scales, enhancing the accuracy of manipulation localization within the image. In machine translation models, positional embeddings--learned weights added to inputs at each position--are commonly used and are effective for linguistic tasks. However, this approach is suboptimal for image processing due to differences in data characteristics. Instead, the authors of this model introduced learned matrix projections to represent all possible relative spatial relationships in a pixel's neighborhood. In the local self-attention block, each pixel considers information from its neighbors through these projections.  
The final component of the processing pipeline, the decision module, is a relatively simple convolutional network consisting of several layers. It analyzes the output of the preceding self-attention module and concludes with a sigmoid activation function [51]. This approach achieved results that were 11.2% better than ManTra-Net under comparable testing conditions.