这是用户在 2025-7-20 10:55 为 https://app.immersivetranslate.com/pdf-pro/7af99bea-38d6-4abb-b911-bc3c3fc06ec9/ 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

Query-efficient Attack for Black-box Image Inpainting Forensics via Reinforcement Learning
基于强化学习的查询高效攻击方法在黑盒图像修复取证中的应用

Xianbo Mo 1 1 ^(1){ }^{1}, Shunquan Tan 1 1 ^(1**){ }^{1 *}, Bin Li 2 2 ^(2){ }^{2}, Jiwu Huang 1 1 ^(1){ }^{1}
莫先波 1 1 ^(1){ }^{1} ,谭顺泉 1 1 ^(1**){ }^{1 *} ,李斌 2 2 ^(2){ }^{2} ,黄继武 1 1 ^(1){ }^{1}
1 1 ^(1){ }^{1} Faculty of Engineering, Shenzhen MSU-BIT University, China
1 1 ^(1){ }^{1} 深圳 MSU-BIT 大学工程学院,中国
2 2 ^(2){ }^{2} Guangdong Provincial Key Laboratory of Intelligent Information Processing, Shenzhen University, China
2 2 ^(2){ }^{2} 中国深圳大学广东省智能信息处理重点实验室
6420240106@smbu.edu.cn,tanshunquan@gmail.com,libin@szu.edu.cn,jwhuang@smbu.edu.cn

Abstract  摘要

Recently, image inpainting has become a common tool for manipulating nature images in a malicious manner, which has led to the rapid advancement of inpainting forensics. Although current forensics methods have shown precise location of inpainting regions and reliable robustness against image post-processing operations, it remains unclear whether they can effectively resist the possible attacks in realworld scenarios. To identify potential flaws, we propose a novel black-box anti-forensics framework to attack inpainting forensics methods, which employs reinforcement learning to generate a query-efficient countermeasure, named RLGC. To this end, we define reinforcement learning paradigm to model the Markov Decision Process of query-based black-box antiforensics scenario. Specifically, pixel-wise agents are used to modulate anti-forensics images based on action selection and query forensics methods to obtain corresponding outputs. Later, reward function evaluates attack effect and image distortion with these outputs. To maximize the cumulative reward, policy and value networks are integrated and trained by Asynchronous Advantage Actor-Critic algorithm. Experimental results demonstrate that, without visually detectable distortion on anti-forensics images, RLGC achieves remarkable attack effects in a highly query-effcient way against various black-box inpainting forensics methods, even outperforming the most representative white-box attack method.
近年来,图像修复技术已成为恶意篡改自然图像的常见工具,这推动了图像修复取证技术的快速发展。尽管现有取证方法能够精确定位修复区域并具备良好的抗图像后处理能力,但其在真实世界场景中是否能有效抵御潜在攻击仍不明确。为识别潜在缺陷,我们提出一种新型黑盒反取证框架,通过强化学习生成查询高效的反制措施,命名为 RLGC,以攻击图像修复取证方法。为此,我们定义强化学习范式,将基于查询的黑盒反取证场景建模为马尔科夫决策过程。具体而言,像素级代理通过动作选择调节反取证图像,并查询取证方法以获取对应输出。随后,奖励函数基于这些输出评估攻击效果与图像失真程度。为最大化累计奖励,策略网络与价值网络通过异步优势演员-批评者算法(Asynchronous Advantage Actor-Critic)进行集成训练。实验结果表明,在不产生可视化可检测畸变的情况下,RLGC 以高度查询高效的方式,对多种黑盒填充取证方法实现了显著的攻击效果,甚至超越了最具代表性的白盒攻击方法。

Introduction  引言

The rapid development of image forgery technologies such as image inpainting has seriously challenged the authenticity and integrity of digital images (Verdoliva 2020). As digital images are frequently employed as evidence and reliable records in contexts such as criminal investigations, journalistic reporting, and intellectual property protection, the detection and localization of inpainted regions within images have emerged as significant research challenges. Numerous forensic methods(Mayer and Stamm 2018; Li and Huang 2019; Wu and Zhou 2022; Yang, Cai, and Kot 2022; Zhang et al. 2023) based on deep learning have been proposed to address these issues in the past decade.
图像生成技术(如图像修复)的快速发展对数字图像的真实性和完整性构成了严峻挑战(Verdoliva 2020)。由于数字图像常被用作刑事调查、新闻报道和知识产权保护等场景中的证据和可靠记录,检测并定位图像中的修复区域已成为重要的研究难题。过去十年间,基于深度学习的多种法医方法(Mayer and Stamm 2018;Li and Huang 2019;Wu and Zhou 2022;Yang, Cai, and Kot 2022;Zhang et al. 2023)已被提出以解决这些问题。
Although deep learning technology has significantly advanced inpainting forensics, current research (Akhtar and
尽管深度学习技术在图像修复取证领域取得了显著进展,但当前研究(Akhtar 和
Mian 2018) has shown that it is vulnerable to adversarial attacks. These attacks introduce perturbations to manipulate input data, thereby misleading the target network into producing incorrect predictions. They are typically classified as either white-box or black-box attacks, depending on the level of prior knowledge about the target network. Whitebox attacks have full access to the details of the target network, while black-box attacks have no access to these internal details. In inpainting forensics, adversarial attacks pose a severe challenge. The reason is that inpainting forensics methods remain the only reliable way to identify inpainting regions, as human eyes struggle to detect manipulated areas within meticulously crafted inpainting images. Consequently, the incorrect forensics results caused by adversarial attacks are of utmost concern. Moreover, since anti-forensics attacks expose vulnerabilities in existing forensics methods, research on these attacks can further promote the design of more robust forensics methods. To address these challenges, many anti-forensics methods have been proposed in recent years (Barni et al. 2019; Carlini and Farid 2020; Xie, Ni, and Shi 2021; Ding et al. 2022; Fan, Hu, and Ding 2024).
Mian(2018)的研究表明,该方法易受对抗攻击的影响。此类攻击通过引入扰动来操纵输入数据,从而误导目标网络产生错误预测。根据对目标网络的先验知识程度,对抗攻击通常被分为白盒攻击和黑盒攻击。白盒攻击能够完全访问目标网络的内部细节,而黑盒攻击则无法获取这些内部信息。在图像修复取证领域,对抗性攻击构成重大挑战。原因在于,填充取证方法仍是识别填充区域的唯一可靠手段,因为人眼难以在精心制作的填充图像中检测出被篡改的区域。因此,对抗攻击导致的错误取证结果尤为令人担忧。此外,由于反取证攻击会暴露现有取证方法的漏洞,对这些攻击的研究可进一步推动更 robust 取证方法的设计。为应对这些挑战,近年来提出了多种反取证方法(Barni 等,2019;Carlini 和 Farid,2020;Xie、Ni 和 Shi,2021;Ding 等,2022;Fan、Hu 和 Ding,2024)。
However, existing attack methods are inappropriate for image inpainting forensics. First, current anti-forensics methods have focused on attacking image-wise classifiers, whereas pixel-wise segmentation networks are used in inpainting forensics. Secondly, in real-world scenarios, inpainting forensics operate as black-box systems, with only query results available to attackers. This makes querybased attacks the most suitable approach for inpainting forensics. Unfortunately, existing anti-forensics methods are predominantly designed for white-box attacks, with several relying on transfer-based black-box attacks. Besides, for query-based black-box adversarial examples methods ( Li ( Li (Li(\mathrm{Li} and Chen 2021; Andriushchenko et al. 2020; Maho, Furon, and Le Merrer 2021) designed for computer vision tasks, current research(Li et al. 2022) has shown that they can be easily detected based on the similarity of successive queries. Nevertheless, this detection method suffers from extremely high false alarm rates when the number of queries is less than 10 . Therefore, there is an urgent need for queryefficient anti-forensics methods tailored for black-box image inpainting forensics, capable of constructing successful attacks with fewer than 10 queries.
然而,现有的攻击方法并不适用于图像修复取证分析。首先,当前的反取证方法主要针对图像级分类器进行攻击,而图像修复取证分析则采用像素级分割网络。其次,在实际场景中,图像修复取证作为黑盒系统运行,攻击者仅能获取查询结果。这使得基于查询的攻击成为图像修复取证中最合适的方法。遗憾的是,现有反取证方法主要针对白盒攻击设计,其中部分方法依赖于基于迁移的黑盒攻击。此外,针对计算机视觉任务设计的基于查询的黑盒对抗样本方法(如 ( Li ( Li (Li(\mathrm{Li} 和 Chen 2021;Andriushchenko et al. 2020;Maho, Furon, and Le Merrer 2021),当前研究(Li et al. 2022)表明,这些方法可通过连续查询的相似性被轻松检测。然而,当查询数量少于 10 时,该检测方法存在极高的误报率。因此,迫切需要针对黑盒图像修复取证的查询高效反取证方法,能够使用少于 10 个查询构建成功的攻击。
To address this, we propose RLGC(Reinforcement
为了解决这个问题,我们提出 RLGC(强化学习)
Learning to Generate Countermeasure) to conduct highly query-efficient attack for black-box image inpainting forensics methods. Our goal is to utilize query results to build adversarial attacks and achieve minimum visual distortion on the original inpainting images. Specifically, we limit the query times of RLGC to less than 10 times to evade the detection of query-based attack defense method(Li et al. 2022). To this end, we first model attack scenario based on RL(Reinforcement Learning) paradigm. Given the original inpainting images, which correspond to the initial state, the agent selects actions based on its policy and conducts state transitions to modulate adversarial perturbations for anti-forensics images. These images are then used to query target forensics networks, obtaining corresponding outputs. The reward function evaluates the attack effect and visual distortion according to these outputs. To maximize the cumulative reward, our policy and value network are integrated by Asynchronous Advantage Actor-Critic (A3C) framework, where the advantage-based loss functions optimize network parameters. Through iterative interactions between agents and image inpainting forensics methods, RLGC’s attack efficiency can be constantly optimized until it achieves the given goal. Our contributions are as follows: (1) We propose the first query-based anti-forensics framework targeting black-box inpainting forensic methods, thereby eliminating the dependence on the transferability of white-box attacks. (2) We first apply a reinforcement learning (RL) paradigm within the anti-forensics framework, enabling pixel-wise agents to learn highly query-efficient policies based on inpainting forensics results. (3) We propose a novel method for generating perturbations that incrementally introduce small magnitudes( + 1 / 1 / 0 + 1 / 1 / 0 +1//-1//0+1 /-1 / 0 ) of noise, thus mitigating the risk of generating excessively strong noise that could leave conspicuous attack traces.
学习生成反制措施,以对黑盒图像修复取证方法进行高查询效率的攻击。我们的目标是利用查询结果构建对抗性攻击,并在原始修复图像上实现最小视觉失真。具体而言,我们将 RLGC 的查询次数限制在 10 次以内,以规避基于查询的攻击防御方法(Li et al. 2022)的检测。为此,我们首先基于强化学习(RL)范式建模攻击场景。给定原始修复图像(对应初始状态),代理根据策略选择动作并进行状态转换,以生成对抗性扰动用于生成反取证图像。这些图像随后用于查询目标取证网络,获取对应输出。奖励函数根据这些输出评估攻击效果和视觉失真。为了最大化累积奖励,我们的策略和价值网络通过异步优势演员-批评家(A3C)框架进行集成,其中基于优势的损失函数优化网络参数。通过代理与图像修复取证方法的迭代交互,RLGC 的攻击效率可不断优化直至达到给定目标。我们的贡献如下:(1) 我们提出了首个针对黑盒图像修复取证方法的查询式反取证框架,从而消除了对白盒攻击可迁移性的依赖。(2) 我们首次在反取证框架中应用强化学习(RL)范式,使像素级代理能够基于图像修复取证结果学习高度查询高效的策略。 (3) 我们提出了一种新型方法,用于生成逐步引入小幅度( + 1 / 1 / 0 + 1 / 1 / 0 +1//-1//0+1 /-1 / 0 )噪声的扰动,从而降低生成过强噪声的风险,避免留下明显的攻击痕迹。

Background and Preliminaries
背景与概述

Image Inpainting Forensics
图像修复取证分析

Given a mask { M = ( m i , j ) ( w × h ) , m i , j { 0 , 1 } } M = m i , j ( w × h ) , m i , j { 0 , 1 } {M=(m_(i,j))^((w xx h)),m_(i,j)in{0,1}}\left\{\mathbf{M}=\left(m_{i, j}\right)^{(w \times h)}, m_{i, j} \in\{0,1\}\right\}, the damaged image can be calculated as: D = ( d i , j , k ) ( w × h × c ) = D = d i , j , k ( w × h × c ) = D=(d_(i,j,k))^((w xx h xx c))=\mathbf{D}=\left(d_{i, j, k}\right)^{(w \times h \times c)}= ( x i , j , k m i , j ) ( w × h × c ) x i , j , k m i , j ( w × h × c ) (x_(i,j,k)**m_(i,j))^((w xx h xx c))\left(x_{i, j, k} * m_{i, j}\right)^{(w \times h \times c)}, image inpainting is to obtain an inpainting image Y Y Y\mathbf{Y} that satisfies:
给定一个掩码 { M = ( m i , j ) ( w × h ) , m i , j { 0 , 1 } } M = m i , j ( w × h ) , m i , j { 0 , 1 } {M=(m_(i,j))^((w xx h)),m_(i,j)in{0,1}}\left\{\mathbf{M}=\left(m_{i, j}\right)^{(w \times h)}, m_{i, j} \in\{0,1\}\right\} ,损坏的图像可以计算为: D = ( d i , j , k ) ( w × h × c ) = D = d i , j , k ( w × h × c ) = D=(d_(i,j,k))^((w xx h xx c))=\mathbf{D}=\left(d_{i, j, k}\right)^{(w \times h \times c)}= ( x i , j , k m i , j ) ( w × h × c ) x i , j , k m i , j ( w × h × c ) (x_(i,j,k)**m_(i,j))^((w xx h xx c))\left(x_{i, j, k} * m_{i, j}\right)^{(w \times h \times c)} ,图像修复的目标是获得一个修复图像 Y Y Y\mathbf{Y} ,满足以下条件:
min Y I X Y , Y = ( y i , j , k ) ( w × h × c ) = θ i ( ( d i , j , k ) ( w × h × c ) ) min Y I X Y , Y = y i , j , k ( w × h × c ) = θ i d i , j , k ( w × h × c ) min_(Y inI)||X-Y||,Y=(y_(i,j,k))^((w xx h xx c))=theta_(i)((d_(i,j,k))^((w xx h xx c)))\min _{Y \in \mathcal{I}}\|\mathbf{X}-\mathbf{Y}\|, \mathbf{Y}=\left(y_{i, j, k}\right)^{(w \times h \times c)}=\theta_{i}\left(\left(d_{i, j, k}\right)^{(w \times h \times c)}\right)
where ||*||\|\cdot\| is L 2 norm, and θ i θ i theta_(i)\theta_{i} is the inpainting algorithm.
其中 ||*||\|\cdot\| 表示 L² 范数, θ i θ i theta_(i)\theta_{i} 表示插值算法。

Over the years, advancements in inpainting frameworks have resulted in synthetic images that are increasingly difficult to distinguish from authentic ones. Consequently, various forensics methods have been proposed for detecting image inpainting (Mayer and Stamm 2018; Li and Huang 2019; Wu and Zhou 2022; Yang, Cai, and Kot 2022; Zhang et al. 2023). These methods not only determine the authenticity of an image but also locate its synthetic regions. Given a ground truth mask M M M\boldsymbol{M}, the objective of inpainting forensics methods θ f θ f theta_(f)\theta_{f} is to predict the mask M p M p M^(p)\boldsymbol{M}^{\boldsymbol{p}} while adhering to the following constraints:
近年来,图像修复框架的不断发展使得生成的合成图像越来越难以与真实图像区分开来。因此,研究人员提出了多种图像修复检测方法(Mayer 和 Stamm 2018;Li 和 Huang 2019;Wu 和 Zhou 2022;Yang、Cai 和 Kot 2022;Zhang 等 2023)。这些方法不仅能够判断图像的真实性,还能定位其合成区域。给定一个真实掩码 M M M\boldsymbol{M} ,图像修复取证方法 θ f θ f theta_(f)\theta_{f} 的目标是在满足以下约束条件的同时预测掩码 M p M p M^(p)\boldsymbol{M}^{\boldsymbol{p}}
min M M p , M p = ( m i , j p ) ( w × h ) = θ f ( ( y i , j , k ) ( w × h × c ) ) min M M p , M p = m i , j p ( w × h ) = θ f y i , j , k ( w × h × c ) min||M-M^(p)||,M^(p)=(m_(i,j)^(p))^((w xx h))=theta_(f)((y_(i,j,k))^((w xx h xx c)))\min \left\|\boldsymbol{M}-\boldsymbol{M}^{\boldsymbol{p}}\right\|, \boldsymbol{M}^{\boldsymbol{p}}=\left(m_{i, j}^{p}\right)^{(w \times h)}=\theta_{f}\left(\left(y_{i, j, k}\right)^{(w \times h \times c)}\right)

Black-box Adversarial Examples
黑盒对抗样本

Black-box attacks can be categorized into two types: (1) Transfer-based attacks: A local substitute model is first trained. Adversarial examples are then generated using white-box attacks such as FGSM(Goodfellow, Shlens, and Szegedy 2015) and i-FGSM(Kurakin, Goodfellow, and Bengio 2017) on the substitute model, which are later directly used to attack target models. The success of these attacks depends on the transferability of white-box adversarial examples, which is influenced by the discrepancy between target and substitute models. (2) Query-based attacks: They can be classified into two categories: score-based attacks( Li and Chen 2021; Andriushchenko et al. 2020) and decision-based attacks(Maho, Furon, and Le Merrer 2021). Score-based attacks involve adding slight perturbations to the input and observing the response of target models. In contrast, decisionbased attacks start from a point already in the adversarial region and use binary search to find a point on the decision boundary between the starting point and the clean example.
黑盒攻击可分为两类:(1) 转移式攻击:首先训练一个本地替换模型。随后,利用白盒攻击(如 FGSM(Goodfellow、Shlens 和 Szegedy,2015)和 i-FGSM(Kurakin、Goodfellow 和 Bengio,2017))在替换模型上生成对抗样本,这些样本随后直接用于攻击目标模型。这些攻击的成功取决于白盒对抗样本的迁移性,而迁移性受目标模型与替换模型之间差异的影响。(2) 查询式攻击:可分为两类:基于评分攻击(Li 和 Chen 2021;Andriushchenko 等 2020)和基于决策攻击(Maho、Furon 和 Le Merrer 2021)。基于评分攻击通过在输入中添加微小扰动并观察目标模型的响应来实现。而基于决策的攻击则从已处于对抗区域的点出发,利用二分搜索在起点与干净示例之间的决策边界上寻找一个点。

Reinforcement Learning  强化学习

RL is one of the three fundamental machine learning paradigms, which focuses on creating intelligent agents that can take actions to maximize cumulative reward. To model a real-world scenario, a tuple ( S , A , π , r , δ S , A , π , r , δ S,A,pi,r,delta\mathcal{S}, \mathcal{A}, \pi, r, \delta ) is defined based on the existing background knowledge, where S S S\mathcal{S} denotes the set of states or the environment, A A A\mathcal{A} represents the action set, π π pi\pi reflects the probability of state transition, r r rr signifies the reward generated by the state transition, and δ δ delta\delta is the discount factor for rewards. Typically, practical RL algorithms are based on infinite-horizon MDP (Markov Decision Process) with successive state transitions. In a single state transition, the process starts from the current state s c S s c S s_(c)inSs_{c} \in \mathcal{S}. Then, an action a c A a c A a_(c)inAa_{c} \in \mathcal{A} is selected according to π ( a c s c ) π a c s c pi(a_(c)∣s_(c))\pi\left(a_{c} \mid s_{c}\right). As a result, s c s c s_(c)s_{c} transitions to next state s n S s n S s_(n)inSs_{n} \in \mathcal{S}, which leads to the reward r ( s c , s n ) r s c , s n r(s_(c),s_(n))r\left(s_{c}, s_{n}\right). In recent years, with the rapid development of deep learning technology, RL has been integrated with deep learning to form the deep RL paradigm.
强化学习(RL)是机器学习三大基本范式之一,其核心在于创建能够通过采取行动来最大化累计奖励的智能代理。为了建模真实世界场景,基于现有背景知识定义了一个元组( S , A , π , r , δ S , A , π , r , δ S,A,pi,r,delta\mathcal{S}, \mathcal{A}, \pi, r, \delta ),其中 S S S\mathcal{S} 表示状态集或环境, A A A\mathcal{A} 表示动作集, π π pi\pi 反映状态转换的概率, r r rr 表示状态转换产生的奖励, δ δ delta\delta 是奖励的折扣因子。通常,实际的 RL 算法基于具有连续状态转换的无限 horizon MDP(马尔可夫决策过程)。在单次状态转换中,过程从当前状态 s c S s c S s_(c)inSs_{c} \in \mathcal{S} 开始。随后,根据 π ( a c s c ) π a c s c pi(a_(c)∣s_(c))\pi\left(a_{c} \mid s_{c}\right) 选择一个动作 a c A a c A a_(c)inAa_{c} \in \mathcal{A} 。结果, s c s c s_(c)s_{c} 过渡到下一个状态 s n S s n S s_(n)inSs_{n} \in \mathcal{S} ,从而获得奖励 r ( s c , s n ) r s c , s n r(s_(c),s_(n))r\left(s_{c}, s_{n}\right) 。近年来,随着深度学习技术的快速发展,RL 与深度学习相结合,形成了深度 RL 范式。
A3C(Mnih et al. 2016) is a deep RL-based algorithm. The foundation of A 3 C is an actor-critic framework, where the actor selects its actions for the current state s c s c s_(c)s_{c} based on π ( a c s c ) π a c s c pi(a_(c)∣s_(c))\pi\left(a_{c} \mid s_{c}\right), while the critic evaluates the value of the next state s n s n s_(n)s_{n}. Typically, deep learning-based policy and value networks are used as the actor and critic in A3C. To train these networks, A3C leverages the advantage of the actor over the critic, which is the difference between the expected reward and value. We denote the policy network and value network as P P PP and V V VV respectively, and represent their parameters as θ p θ p theta_(p)\theta_{p} and θ v θ v theta_(v)\theta_{v}. At time step t t tt, the expected reward of N N NN following states { s ( t + i ) i = 0 , 1 , , N 1 } s ( t + i ) i = 0 , 1 , , N 1 {s_((t+i))∣i=0,1,dots,N-1}\left\{s_{(t+i)} \mid i=0,1, \ldots, N-1\right\} is calculated as:
A3C(Mnih 等,2016)是一种基于深度强化学习的算法。A3C 的基础是一个演员-批评家框架,其中演员根据当前状态 s c s c s_(c)s_{c} 选择其动作,而批评家评估下一个状态的价值 s n s n s_(n)s_{n} 。通常,深度学习基政策网络和价值网络被用作 A3C 中的演员和批评者。为了训练这些网络,A3C 利用了演员相对于批评者的优势,即预期奖励与价值之间的差异。我们分别用 P P PP V V VV 表示策略网络和价值网络,并用 θ p θ p theta_(p)\theta_{p} θ v θ v theta_(v)\theta_{v} 表示其参数。在时间步 t t tt ,状态 { s ( t + i ) i = 0 , 1 , , N 1 } s ( t + i ) i = 0 , 1 , , N 1 {s_((t+i))∣i=0,1,dots,N-1}\left\{s_{(t+i)} \mid i=0,1, \ldots, N-1\right\} 的预期奖励 N N NN 计算为:
R ¯ ( t ) N = i = 0 N 1 λ i r ( t + i ) + λ N V ( s ( t + N ) ) R ¯ ( t ) N = i = 0 N 1 λ i r ( t + i ) + λ N V s ( t + N ) bar(R)_((t))^(N)=sum_(i=0)^(N-1)lambda^(i)r_((t+i))+lambda^(N)V(s_((t+N)))\bar{R}_{(t)}^{N}=\sum_{i=0}^{N-1} \lambda^{i} r_{(t+i)}+\lambda^{N} V\left(s_{(t+N)}\right)
where r t r t r_(t)r_{t} is the reward of state s t , V ( s ( t + N ) ) s t , V s ( t + N ) s_(t),V(s_((t+N)))s_{t}, V\left(s_{(t+N)}\right) is the value of state s ( t + N ) s ( t + N ) s_((t+N))s_{(t+N)}, and λ λ lambda\lambda is discount factor. Then, advantage function of actor over critic can be represented as:
其中, r t r t r_(t)r_{t} 表示状态 s t , V ( s ( t + N ) ) s t , V s ( t + N ) s_(t),V(s_((t+N)))s_{t}, V\left(s_{(t+N)}\right) 的奖励, s ( t + N ) s ( t + N ) s_((t+N))s_{(t+N)} 表示状态 s ( t + N ) s ( t + N ) s_((t+N))s_{(t+N)} 的价值, λ λ lambda\lambda 表示折扣因子。 然后,演员相对于批评者的优势函数可以表示为:
A ( a t , s t ) = R ¯ ( t ) N V ( s t ) . A a t , s t = R ¯ ( t ) N V s t . A(a_(t),s_(t))= bar(R)_((t))^(N)-V(s_(t)).A\left(a_{t}, s_{t}\right)=\bar{R}_{(t)}^{N}-V\left(s_{t}\right) .
From the respect of critic, its target is to minimize A ( a t , s t ) A a t , s t A(a_(t),s_(t))A\left(a_{t}, s_{t}\right) through the gradient descent algorithm as:
从批评的角度来看,其目标是通过梯度下降算法最小化 A ( a t , s t ) A a t , s t A(a_(t),s_(t))A\left(a_{t}, s_{t}\right) ,具体如下:
d θ v = θ v ( ( A ( a t , s t ) ) 2 ) d θ v = θ v A a t , s t 2 d_(theta_(v))=grad_(theta_(v))((A(a_(t),s_(t)))^(2))d_{\theta_{v}}=\nabla_{\theta_{v}}\left(\left(A\left(a_{t}, s_{t}\right)\right)^{2}\right)
where d θ v d θ v d_(theta_(v))d_{\theta_{v}} is the gradient of V V VV. On the other hand, actor’s target is to maximize A ( a ( t ) , s ( t ) ) A ( a ( t ) , s ( t ) ) A(a(t),s(t))A(a(t), s(t)), thus P P PP 's gradient d θ p d θ p d_(theta_(p))d_{\theta_{p}} is:
其中 d θ v d θ v d_(theta_(v))d_{\theta_{v}} V V VV 的梯度。另一方面,演员的目标是最大化 A ( a ( t ) , s ( t ) ) A ( a ( t ) , s ( t ) ) A(a(t),s(t))A(a(t), s(t)) ,因此 P P PP 的梯度 d θ p d θ p d_(theta_(p))d_{\theta_{p}} 为:
d θ p = θ p ( log π ( a t s t ) ( A ( a t , s t ) ) ) d θ p = θ p log π a t s t A a t , s t d_(theta_(p))=grad_(theta_(p))(-log pi(a_(t)∣s_(t))(A(a_(t),s_(t))))d_{\theta_{p}}=\nabla_{\theta_{p}}\left(-\log \pi\left(a_{t} \mid s_{t}\right)\left(A\left(a_{t}, s_{t}\right)\right)\right)
where log π ( a t s t ) log π a t s t log pi(a_(t)∣s_(t))\log \pi\left(a_{t} \mid s_{t}\right) is the probability map outputted by P P PP.
其中 log π ( a t s t ) log π a t s t log pi(a_(t)∣s_(t))\log \pi\left(a_{t} \mid s_{t}\right) 是由 P P PP 输出的概率图。

In addition, A3C uses asynchronous gradient descent with multiple agents running independently on separate threads, sharing policy and value networks. They gather training data through state transitions, calculate gradients, and update networks asynchronously, allowing for more efficient training and improved policy learning.
此外,A3C 采用异步梯度下降算法,多个代理在独立的线程上运行,共享策略网络和价值网络。它们通过状态转换收集训练数据,计算梯度,并异步更新网络,从而实现更高效的训练和更好的策略学习。

Proposed Method  建议方法

To propose a practical anti-forensics framework, two major challenges need to be addressed. The first one arises from the fact that most forensics methods are black-box systems. As copyright protection and security concerns prevent the disclosure of such methods’ details, only the forensics results are available to users querying these black-box systems. Thus, a practical anti-forensics framework should be developed based on only query results. Building upon this assumption, the simplest query-based attack on black-box inpainting forensics systems can be conducted by adding random noise (perturbation) to inpainting images until the query results indicate that it successfully disrupts the outputs. Fig. 1 illustrates this procedure. However, this type of attack is likely to be query-intensive due to the lack of prior knowledge about the target forensics system and the inefficiency in utilizing query results. Additionally, it may result in visually detectable distortions in inpainting images due to the cumulative effect of excessive random noise.
为了提出一个实用的反取证框架,需要解决两个主要挑战。第一个挑战源于大多数取证方法是黑盒系统。由于版权保护和安全考虑,这些方法的细节无法公开,用户只能通过查询这些黑盒系统获得取证结果。因此,一个实用的反取证框架应基于仅查询结果进行开发。基于此假设,对黑盒图像修复取证系统最简单的查询式攻击可通过向修复图像添加随机噪声(扰动)直至查询结果表明其成功破坏输出结果来实现。图 1 展示了该过程。然而,此类攻击可能因缺乏对目标取证系统的先验知识及查询结果利用效率低下而导致查询密集型。此外,过多的随机噪声的累积效应可能导致修复图像中出现可视化的可检测失真。
Thus, the second challenge entails minimizing the total number of queries n n nn required while retaining optimal attack performance, which corresponds to build a query-efficient anti-forensics framework. However, the smaller n n nn usually means a compromised attack performance, thereby defeating the primary objective of the anti-forensics attack. Therefore, it is imperative to balance between visual quality and attack efficacy.
因此,第二个挑战在于在保持最佳攻击性能的同时,尽可能减少所需的查询总数,这对应于构建一个查询高效的反取证框架。然而,较小的查询数量通常意味着攻击性能的下降,从而违背了反取证攻击的主要目标。因此,必须在视觉质量和攻击效果之间取得平衡。
As depicted in Fig. 1, it is evident that at any given time step ( 0 < t n ) ( 0 < t n ) (0 < t <= n)(0<t \leq n), the current inpainting image X t X t X_(t)\boldsymbol{X}_{\boldsymbol{t}} can be simplified to depend solely on x t 1 x t 1 x_(t-1)\boldsymbol{x}_{\boldsymbol{t}-\mathbf{1}} and its corresponding perturbation ξ t 1 ξ t 1 xi_(t-1)\boldsymbol{\xi}_{t-1}. This dependency can be mathematically expressed based on transition probability π π pi\pi as follows:
如图 1 所示,在任意时间步 ( 0 < t n ) ( 0 < t n ) (0 < t <= n)(0<t \leq n) ,当前的插值图像 X t X t X_(t)\boldsymbol{X}_{\boldsymbol{t}} 可以简化为仅依赖于 x t 1 x t 1 x_(t-1)\boldsymbol{x}_{\boldsymbol{t}-\mathbf{1}} 及其对应的扰动 ξ t 1 ξ t 1 xi_(t-1)\boldsymbol{\xi}_{t-1} 。这种依赖关系可以基于转移概率 π π pi\pi 数学表达如下:
π ( X t X 0 : t 1 , ξ 0 : t 1 ) = π ( X t X t 1 , ξ t 1 ) π X t X 0 : t 1 , ξ 0 : t 1 = π X t X t 1 , ξ t 1 pi(X_(t)∣X_(0:t-1),xi_(0:t-1))=pi(X_(t)∣X_(t-1),xi_(t-1))\pi\left(\boldsymbol{X}_{\boldsymbol{t}} \mid \boldsymbol{X}_{0: t-1}, \boldsymbol{\xi}_{0: t-1}\right)=\pi\left(\boldsymbol{X}_{\boldsymbol{t}} \mid \boldsymbol{X}_{\boldsymbol{t}-1}, \boldsymbol{\xi}_{\boldsymbol{t}-1}\right)
This equation confirms that the state transition from x t 1 x t 1 x_(t-1)\boldsymbol{x}_{\boldsymbol{t}-\mathbf{1}} to x t x t x_(t)\boldsymbol{x}_{\boldsymbol{t}} satisfies the Markov property, where t t tt ranges from 1 to n n nn. Thus, we can model query procedure as a MDP guided by a given policy. And an effective policy is desired to make RLGC query-efficient. We propose a CNN-based policy to accomplish this. Additionally, we employ the A3C algorithm to better optimize our policy network. Prior to this, we need to define the fundamental elements of the RL paradigm used in RLGC.
该方程证实了状态从 x t 1 x t 1 x_(t-1)\boldsymbol{x}_{\boldsymbol{t}-\mathbf{1}} x t x t x_(t)\boldsymbol{x}_{\boldsymbol{t}} 的转换满足马尔可夫性质,其中 t t tt 的取值范围为 1 到 n n nn 。因此,我们可以将查询过程建模为由给定策略引导的马尔可夫决策问题(MDP)。为了使 RLGC 查询高效,我们需要一个有效的策略。我们提出了一种基于卷积神经网络(CNN)的策略来实现这一目标。此外,我们采用 A3C 算法对策略网络进行进一步优化。在此之前,我们需要定义 RLGC 中使用的强化学习范式的基本要素。

Figure 1: The illustration of querying black-box inpainting .
图 1:黑盒子图像修复的查询示意图。

Elements Definition  元素定义

Environmental model In RLGC, inpainting forensics methods serve as environmental model, with IID-Net(Wu and Zhou 2022) being utilized. IID-Net is selected due to its excellent detection performance and robustness against various image post-processing operations.
环境模型 在 RLGC 中,图像修复取样方法被用作环境模型,其中采用了 IID-Net(Wu 和 Zhou,2022)。IID-Net 被选中是因为其出色的检测性能和对各种图像后处理操作的鲁棒性。
Agent Building upon the multi-threaded asynchronous parallel concept of the A3C framework, we assign an individual agent to each pixel. The objective is to empower each agent to adaptively determine its direction and magnitude of the perturbation by taking into consideration the distribution of neighboring pixels.
基于 A3C 框架的多线程异步并行概念,我们为每个像素分配一个独立的代理。目标是使每个代理能够根据邻近像素的分布,自适应地确定扰动的方向和幅度。
State Our state set S S S\mathcal{S} consists of images set I I I\mathcal{I}, forming a high-dimensional space with the size of 256 ( w × l × c ) 256 ( w × l × c ) 256^((w xx l xx c))256^{(w \times l \times c)}. However, it is unnecessary to explore the entire state space as even small perturbations can lead to excellent attack performance. Specifically, given an original inpainting image X 0 I X 0 I X_(0)inI\boldsymbol{X}_{\mathbf{0}} \in \mathcal{I}, it serves as the initial state S 0 S 0 S_(0)\boldsymbol{S}_{\mathbf{0}}.
状态 我们的状态集 S S S\mathcal{S} 由图像集 I I I\mathcal{I} 组成,形成一个维度为 256 ( w × l × c ) 256 ( w × l × c ) 256^((w xx l xx c))256^{(w \times l \times c)} 的高维空间。然而,无需探索整个状态空间,因为即使是微小的扰动也可能导致出色的攻击性能。具体来说,给定一个原始的图像修复图像 X 0 I X 0 I X_(0)inI\boldsymbol{X}_{\mathbf{0}} \in \mathcal{I} ,它作为初始状态 S 0 S 0 S_(0)\boldsymbol{S}_{\mathbf{0}}
Action RLGC leverages actions as a mean to modulate perturbations for attacking forensics models. To help agents achieve more precise control, we set the magnitude of each perturbation to 1 . For color images with three channels, the image-wise action map A A A\boldsymbol{A} can be denoted as A = { ( a i , j , k R , a i , j , k G , a i , j , k B ) ( w h c ) a i , j , k R , a i , j , k G , a i , j , k B A = a i , j , k R , a i , j , k G , a i , j , k B ( w h c ) a i , j , k R , a i , j , k G , a i , j , k B A={(a_(i,j,k)^(R),a_(i,j,k)^(G),a_(i,j,k)^(B))^((w**h**c))∣a_(i,j,k)^(R),a_(i,j,k)^(G),a_(i,j,k)^(B)in:}\boldsymbol{A}=\left\{\left(a_{i, j, k}^{R}, a_{i, j, k}^{G}, a_{i, j, k}^{B}\right)^{(w * h * c)} \mid a_{i, j, k}^{R}, a_{i, j, k}^{G}, a_{i, j, k}^{B} \in\right. { 0 , 1 , + 1 } } { 0 , 1 , + 1 } } {0,-1,+1}}\{0,-1,+1\}\}, where ( a i , j , k R , a i , j , k G , a i , j , k B a i , j , k R , a i , j , k G , a i , j , k B a_(i,j,k)^(R),a_(i,j,k)^(G),a_(i,j,k)^(B)a_{i, j, k}^{R}, a_{i, j, k}^{G}, a_{i, j, k}^{B} ) are corresponding to R , G , B R , G , B R,G,B\mathrm{R}, \mathrm{G}, \mathrm{B} channel of color images.
动作 RLGC 利用动作作为调节扰动以攻击取证模型的手段。为了帮助代理实现更精确的控制,我们将每个扰动的幅度设置为 1。对于三通道的彩色图像,图像级动作映射 A A A\boldsymbol{A} 可表示为 A = { ( a i , j , k R , a i , j , k G , a i , j , k B ) ( w h c ) a i , j , k R , a i , j , k G , a i , j , k B A = a i , j , k R , a i , j , k G , a i , j , k B ( w h c ) a i , j , k R , a i , j , k G , a i , j , k B A={(a_(i,j,k)^(R),a_(i,j,k)^(G),a_(i,j,k)^(B))^((w**h**c))∣a_(i,j,k)^(R),a_(i,j,k)^(G),a_(i,j,k)^(B)in:}\boldsymbol{A}=\left\{\left(a_{i, j, k}^{R}, a_{i, j, k}^{G}, a_{i, j, k}^{B}\right)^{(w * h * c)} \mid a_{i, j, k}^{R}, a_{i, j, k}^{G}, a_{i, j, k}^{B} \in\right. { 0 , 1 , + 1 } } { 0 , 1 , + 1 } } {0,-1,+1}}\{0,-1,+1\}\} ,其中 ( a i , j , k R , a i , j , k G , a i , j , k B a i , j , k R , a i , j , k G , a i , j , k B a_(i,j,k)^(R),a_(i,j,k)^(G),a_(i,j,k)^(B)a_{i, j, k}^{R}, a_{i, j, k}^{G}, a_{i, j, k}^{B} ) 对应于彩色图像的 R , G , B R , G , B R,G,B\mathrm{R}, \mathrm{G}, \mathrm{B} 通道。
State transition The transition of S t S t S_(t)\boldsymbol{S}_{\boldsymbol{t}} to S t + 1 S t + 1 S_(t+1)\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}}, denoted as T ( S t + 1 S t , A t ) T S t + 1 S t , A t T(S_(t+1)∣S_(t),A_(t))T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), can be formulated as:
状态转换 S t S t S_(t)\boldsymbol{S}_{\boldsymbol{t}} S t + 1 S t + 1 S_(t+1)\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} 的转换,记为 T ( S t + 1 S t , A t ) T S t + 1 S t , A t T(S_(t+1)∣S_(t),A_(t))T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right) ,可表示为:
T ( S t + 1 S t , A t ) : X t + 1 = X t + A t ( x i , j , k t + 1 ) w h c = ( x i , j , k t + a i , j , k t ) w × h × c T S t + 1 S t , A t : X t + 1 = X t + A t x i , j , k t + 1 w h c = x i , j , k t + a i , j , k t w × h × c {:[T(S_(t+1)∣S_(t),A_(t)):X_(t+1)=X_(t)+A_(t)],[(x_(i,j,k)^(t+1))^(w**h**c)=(x_(i,j,k)^(t)+a_(i,j,k)^(t))^(w xx h xx c)]:}\begin{aligned} T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right): \boldsymbol{X}_{\boldsymbol{t}+\mathbf{1}} & =\boldsymbol{X}_{\boldsymbol{t}}+\boldsymbol{A}_{\boldsymbol{t}} \\ \left(x_{i, j, k}^{t+1}\right)^{w * h * c} & =\left(x_{i, j, k}^{t}+a_{i, j, k}^{t}\right)^{w \times h \times c} \end{aligned}
where X t X t X_(t)\boldsymbol{X}_{t} and X t + 1 X t + 1 X_(t+1)\boldsymbol{X}_{\boldsymbol{t}+\boldsymbol{1}} are corresponding to S t S t S_(t)\boldsymbol{S}_{\boldsymbol{t}} and S t + 1 . A t S t + 1 . A t S_(t+1).A_(t)\boldsymbol{S}_{\boldsymbol{t}+\boldsymbol{1}} . \boldsymbol{A}_{\boldsymbol{t}} is the action map that agents take at S t S t S_(t)\boldsymbol{S}_{\boldsymbol{t}}.
其中, X t X t X_(t)\boldsymbol{X}_{t} X t + 1 X t + 1 X_(t+1)\boldsymbol{X}_{\boldsymbol{t}+\boldsymbol{1}} 分别对应于 S t S t S_(t)\boldsymbol{S}_{\boldsymbol{t}} ,而 S t + 1 . A t S t + 1 . A t S_(t+1).A_(t)\boldsymbol{S}_{\boldsymbol{t}+\boldsymbol{1}} . \boldsymbol{A}_{\boldsymbol{t}} 表示代理在 S t S t S_(t)\boldsymbol{S}_{\boldsymbol{t}} 处执行的动作映射。

Figure 2: The illustration of a state transition of our proposed anti-forensics framework.
图 2:我们提出的反取证框架的状态转换示意图。
Reward function RLGC considers attack effect and visual distortion in reward function. Given an arbitrary state transition T ( S t + 1 S t , A t ) T S t + 1 S t , A t T(S_(t+1)∣S_(t),A_(t))T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), its reward map R = R = R=\boldsymbol{R}= ( r i , j , k ) w × h × c r i , j , k w × h × c (r_(i,j,k))^(w xx h xx c)\left(r_{i, j, k}\right)^{w \times h \times c} can be calculated as:
奖励函数 RLGC 在奖励函数中考虑了攻击效果和视觉失真。给定一个任意状态转换 T ( S t + 1 S t , A t ) T S t + 1 S t , A t T(S_(t+1)∣S_(t),A_(t))T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right) ,其奖励映射 R = R = R=\boldsymbol{R}= ( r i , j , k ) w × h × c r i , j , k w × h × c (r_(i,j,k))^(w xx h xx c)\left(r_{i, j, k}\right)^{w \times h \times c} 可计算为:
R ( T ( S t + 1 S t , A t ) ) = ω d × R D ( T ( S t + 1 S t , A t ) , S 0 ) + ω a × R A ( T ( S t + 1 S t , A t ) , M ) R T S t + 1 S t , A t = ω d × R D T S t + 1 S t , A t , S 0 + ω a × R A T S t + 1 S t , A t , M {:[R(T(S_(t+1)∣S_(t),A_(t)))=omega_(d)xxR_(D)(T(S_(t+1)∣S_(t),A_(t)),S_(0))+],[omega_(a)xxR_(A)(T(S_(t+1)∣S_(t),A_(t)),M)]:}\begin{gathered} \boldsymbol{R}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right)\right)=\omega_{d} \times \boldsymbol{R}_{\boldsymbol{D}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{S}_{\mathbf{0}}\right)+ \\ \omega_{a} \times \boldsymbol{R}_{\boldsymbol{A}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{M}\right) \end{gathered}
where R D ( T ( S t + 1 S t , A t ) , S 0 ) R D T S t + 1 S t , A t , S 0 R_(D)(T(S_(t+1)∣S_(t),A_(t)),S_(0))\boldsymbol{R}_{\boldsymbol{D}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{S}_{\mathbf{0}}\right) corresponds to visual distortion difference; R A ( T ( S t + 1 S t , A t ) , M ) R A T S t + 1 S t , A t , M R_(A)(T(S_(t+1)∣S_(t),A_(t)),M)\boldsymbol{R}_{\boldsymbol{A}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{M}\right) corresponds to attack performance difference; M M M\boldsymbol{M} is ground truth mask. Specifically R D R D R_(D)\boldsymbol{R}_{\boldsymbol{D}} and R A R A R_(A)\boldsymbol{R}_{\boldsymbol{A}} are calculated as follows:
其中 R D ( T ( S t + 1 S t , A t ) , S 0 ) R D T S t + 1 S t , A t , S 0 R_(D)(T(S_(t+1)∣S_(t),A_(t)),S_(0))\boldsymbol{R}_{\boldsymbol{D}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{S}_{\mathbf{0}}\right) 表示视觉失真差异; R A ( T ( S t + 1 S t , A t ) , M ) R A T S t + 1 S t , A t , M R_(A)(T(S_(t+1)∣S_(t),A_(t)),M)\boldsymbol{R}_{\boldsymbol{A}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{M}\right) 表示攻击性能差异; M M M\boldsymbol{M} 为地面 truth 掩码。具体而言, R D R D R_(D)\boldsymbol{R}_{\boldsymbol{D}} R A R A R_(A)\boldsymbol{R}_{\boldsymbol{A}} 的计算方法如下:
R D ( T ( S t + 1 S t , A t ) , S 0 ) = ( r i , j , k d ) w × h × c = [ ( X t X 0 ) ( X t X 0 ) ] [ ( X t + 1 X 0 ) ( X t + 1 X 0 ) ] = { ( x i , j , k t x i , j , k 0 ) 2 ( x i , j , k t + 1 x i , j , k 0 ) 2 i { 1 , 2 , , w } , j { 1 , 2 , , h } , k { 1 , 2 , . . , c } } R A ( T ( S t + 1 S t , A t ) , M ) = ( r i , j , k a ) w × h × c = [ ( M t M ) ( M t M ) ] [ ( M t + 1 M ) ( M t + 1 M ) ] = { ( m i , j t m i , j ) 2 ( m i , j t + 1 m i , j ) 2 i { 1 , 2 , , w } , j { 1 , 2 , , h } , k { 1 , 2 , . . , c } } R D T S t + 1 S t , A t , S 0 = r i , j , k d w × h × c = X t X 0 X t X 0 X t + 1 X 0 X t + 1 X 0 = x i , j , k t x i , j , k 0 2 x i , j , k t + 1 x i , j , k 0 2 i { 1 , 2 , , w } , j { 1 , 2 , , h } , k { 1 , 2 , . . , c } } R A T S t + 1 S t , A t , M = r i , j , k a w × h × c = M t M M t M M t + 1 M M t + 1 M = m i , j t m i , j 2 m i , j t + 1 m i , j 2 i { 1 , 2 , , w } , j { 1 , 2 , , h } , k { 1 , 2 , . . , c } } {:[R_(D)(T(S_(t+1)∣S_(t),A_(t)),S_(0))=(r_(i,j,k)^(d))^(w xx h xx c)],[=[(X_(t)-X_(0))**(X_(t)-X_(0))]-],[[(X_(t+1)-X_(0))**(X_(t+1)-X_(0))]],[={(x_(i,j,k)^(t)-x_(i,j,k)^(0))^(2)-(x_(i,j,k)^(t+1)-x_(i,j,k)^(0))^(2)∣:}],[i in{1","2","dots","w}","j in{1","2","dots","h}","k in{1","2","..","c}}],[R_(A)(T(S_(t+1)∣S_(t),A_(t)),M)=(r_(i,j,k)^(a))^(w xx h xx c)],[=[(M_(t)-M)**(M_(t)-M)]-],[[(M_(t+1)-M)**(M_(t+1)-M)]],[={(m_(i,j)^(t)-m_(i,j))^(2)-(m_(i,j)^(t+1)-m_(i,j))^(2)∣:}],[i in{1","2","dots","w}","j in{1","2","dots","h}","k in{1","2","..","c}}]:}\begin{aligned} & \boldsymbol{R}_{\boldsymbol{D}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{S}_{\mathbf{0}}\right)=\left(r_{i, j, k}^{d}\right)^{w \times h \times c} \\ & =\left[\left(\boldsymbol{X}_{\boldsymbol{t}}-\boldsymbol{X}_{\mathbf{0}}\right) *\left(\boldsymbol{X}_{\boldsymbol{t}}-\boldsymbol{X}_{\mathbf{0}}\right)\right]- \\ & {\left[\left(\boldsymbol{X}_{\boldsymbol{t}+\mathbf{1}}-\boldsymbol{X}_{\mathbf{0}}\right) *\left(\boldsymbol{X}_{\boldsymbol{t}+\mathbf{1}}-\boldsymbol{X}_{\mathbf{0}}\right)\right]} \\ & =\left\{\left(x_{i, j, k}^{t}-x_{i, j, k}^{0}\right)^{2}-\left(x_{i, j, k}^{t+1}-x_{i, j, k}^{0}\right)^{2} \mid\right. \\ & i \in\{1,2, \ldots, w\}, j \in\{1,2, \ldots, h\}, k \in\{1,2, . ., c\}\} \\ & \boldsymbol{R}_{\boldsymbol{A}}\left(T\left(\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}} \mid \boldsymbol{S}_{\boldsymbol{t}}, \boldsymbol{A}_{\boldsymbol{t}}\right), \boldsymbol{M}\right)=\left(r_{i, j, k}^{a}\right)^{w \times h \times c} \\ & =\left[\left(\boldsymbol{M}_{\boldsymbol{t}}-\boldsymbol{M}\right) *\left(\boldsymbol{M}_{\boldsymbol{t}}-\boldsymbol{M}\right)\right]- \\ & {\left[\left(\boldsymbol{M}_{\boldsymbol{t}+\mathbf{1}}-\boldsymbol{M}\right) *\left(\boldsymbol{M}_{\boldsymbol{t}+\mathbf{1}}-\boldsymbol{M}\right)\right]} \\ & =\left\{\left(m_{i, j}^{t}-m_{i, j}\right)^{2}-\left(m_{i, j}^{t+1}-m_{i, j}\right)^{2} \mid\right. \\ & i \in\{1,2, \ldots, w\}, j \in\{1,2, \ldots, h\}, k \in\{1,2, . ., c\}\} \end{aligned}
where *** is Hadamard Product symbol, X t + 1 , X t X t + 1 , X t X_(t+1),X_(t)\boldsymbol{X}_{\boldsymbol{t}+\boldsymbol{1}}, \boldsymbol{X}_{\boldsymbol{t}} are the inpainting images corresponding to S t + 1 , S t S t + 1 , S t S_(t+1),S_(t)\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}}, \boldsymbol{S}_{\boldsymbol{t}}, respectively. M t + 1 M t + 1 M_(t+1)\boldsymbol{M}_{\boldsymbol{t}+\mathbf{1}} and M t M t M_(t)\boldsymbol{M}_{\boldsymbol{t}} are the predicted masks outputted by the target forensics model.
其中, *** 表示哈达玛积符号, X t + 1 , X t X t + 1 , X t X_(t+1),X_(t)\boldsymbol{X}_{\boldsymbol{t}+\boldsymbol{1}}, \boldsymbol{X}_{\boldsymbol{t}} 分别表示与 S t + 1 , S t S t + 1 , S t S_(t+1),S_(t)\boldsymbol{S}_{\boldsymbol{t}+\mathbf{1}}, \boldsymbol{S}_{\boldsymbol{t}} 对应的插值图像。 M t + 1 M t + 1 M_(t+1)\boldsymbol{M}_{\boldsymbol{t}+\mathbf{1}} M t M t M_(t)\boldsymbol{M}_{\boldsymbol{t}} 表示目标取证模型输出的预测掩码。

Policy Optimization Network
政策优化网络

The A3C-based policy optimization network in RLGC can be divided into three different modules as follows:
基于 A3C 的强化学习与全球协调(RLGC)中的政策优化网络可分为以下三个不同模块:
Encoder The encoder module enables RLGC to process high-dimensional states in an efficient manner. By compressing these states into lower-dimensional representations, redundant information can be removed, facilitating the learning process of our agent with the most relevant data for the anti-forensics task. To this end, we have utilized the ImageNet(Deng et al. 2009) pre-trained EfficientNet(Tan and Le 2019) to initialize our encoder module. This pre-trained network provides a plethora of useful feature information derived from natural images, with its intermediate layer features utilized for the input and concatenated layers of the actor and critic. Hence, our encoder module employs the down-sampled blocks extracted from EfficientNet B1.
编码器编码器模块使 RLGC 能够以高效的方式处理高维状态。通过将这些状态压缩为低维表示,可以去除冗余信息,从而使我们的代理能够使用与反取证任务最相关的数据进行学习。为此,我们利用 ImageNet(Deng et al. 2009)预训练的 EfficientNet(Tan and Le 2019)来初始化编码器模块。该预训练网络从自然图像中提取了大量有用的特征信息,其中中间层特征被用于演员和批评器的输入及拼接层。因此,我们的编码器模块采用从 EfficientNet B1 中提取的下采样块。
Actor It generates a policy that directs the attack based on the features derived from the encoder. To achieve this, the actor module provides probability distributions for the sampling process of the action set, which consists of 27 items. Therefore, the output of the actor module can be expressed as a probability distribution over the action set as P = { ( p i , j , k ) ( w × h × 27 ) , k = 1 27 p i , j , k = 1 , ( i , j ) P = p i , j , k ( w × h × 27 ) , k = 1 27 p i , j , k = 1 , ( i , j ) P={(p_(i,j,k))^((w xx h xx27)),∣sum_(k=1)^(27)p_(i,j,k)=1,AA(i,j)in:}\boldsymbol{P}=\left\{\left(p_{i, j, k}\right)^{(w \times h \times 27)}, \mid \sum_{k=1}^{27} p_{i, j, k}=1, \forall(i, j) \in\right. { 1 , 2 , , w } × { 1 , 2 , , h } } { 1 , 2 , , w } × { 1 , 2 , , h } } {1,2,dots,w}xx{1,2,dots,h}}\{1,2, \ldots, w\} \times\{1,2, \ldots, h\}\}.
演员模块根据编码器提取的特征生成一个策略,用于指导攻击行为。为了实现这一目标,演员模块为动作集的采样过程提供了概率分布,该动作集包含 27 个元素。因此,演员模块的输出可以表示为动作集上的概率分布,即 P = { ( p i , j , k ) ( w × h × 27 ) , k = 1 27 p i , j , k = 1 , ( i , j ) P = p i , j , k ( w × h × 27 ) , k = 1 27 p i , j , k = 1 , ( i , j ) P={(p_(i,j,k))^((w xx h xx27)),∣sum_(k=1)^(27)p_(i,j,k)=1,AA(i,j)in:}\boldsymbol{P}=\left\{\left(p_{i, j, k}\right)^{(w \times h \times 27)}, \mid \sum_{k=1}^{27} p_{i, j, k}=1, \forall(i, j) \in\right. { 1 , 2 , , w } × { 1 , 2 , , h } } { 1 , 2 , , w } × { 1 , 2 , , h } } {1,2,dots,w}xx{1,2,dots,h}}\{1,2, \ldots, w\} \times\{1,2, \ldots, h\}\}
Critic It is used for value function approximation. The goal of the critic module is to estimate the value function of the current attacked image based on the features provided by encoder, which is defined as the expected sum of future rewards that an agent can receive from the current attacked image. Thus, we denote the value map as V = ( v i , j , k ) ( w × h × c ) V = v i , j , k ( w × h × c ) V=(v_(i,j,k))^((w xx h xx c))\boldsymbol{V}=\left(v_{i, j, k}\right)^{(w \times h \times c)}, whose size is the same as reward map.
批评者 用于价值函数近似。批评者模块的目标是基于编码器提供的特征,估计当前攻击图像的价值函数,该函数定义为代理从当前攻击图像中未来可能获得的奖励的预期总和。因此,我们将价值映射表示为 V = ( v i , j , k ) ( w × h × c ) V = v i , j , k ( w × h × c ) V=(v_(i,j,k))^((w xx h xx c))\boldsymbol{V}=\left(v_{i, j, k}\right)^{(w \times h \times c)} ,其大小与奖励映射相同。
The actor and critic are both responsible for processing the encoder’s features to accomplish their specific tasks. Consequently, we have designed a similar network structure for both components. The middle layers of actor and critics are same as the upsampling module of UNet(Ronneberger,
演员和评论员都负责处理编码器的特征以完成各自的特定任务。因此,我们为这两个组件设计了相似的网络结构。演员和评论员的中间层与 UNet(Ronneberger,
Fischer, and Brox 2015). For the activation function of output layer, it is Softmax for actor, while it is Tanh for critic.
费舍尔和布罗克斯(2015)。对于输出层的激活函数,演员的激活函数为 Softmax,而批评者的激活函数为 Tanh。

Training and Testing Procedures
培训与测试流程

In this section, we describe how RL elements collaborate with policy optimization algorithm to construct query-based attack via state transitions, as depicted in Fig. 2. Started from arbitrary current state s t s t s_(t)s_{t}, encoder model takes it as input and outputs the corresponding features for actor and critic. Later, the action map A t A t A_(t)\boldsymbol{A}_{\boldsymbol{t}} is sampled from policy map P t P t P_(t)\boldsymbol{P}_{\boldsymbol{t}} outputted by actor, while the value map V t V t V_(t)\boldsymbol{V}_{\boldsymbol{t}} is directly generated by critic. After conducting state transition T ( s t + 1 s t , A t ) T s t + 1 s t , A t T(s_(t+1)∣s_(t),A_(t))T\left(s_{t+1} \mid s_{t}, \boldsymbol{A}_{\boldsymbol{t}}\right), the reward map R t R t R_(t)\boldsymbol{R}_{t} is obtained through calculating reward function (Equation (9)). In the training procedure, V t V t V_(t)\boldsymbol{V}_{\boldsymbol{t}} and R t R t R_(t)\boldsymbol{R}_{\boldsymbol{t}} generated by 6 state successive state transitions are used to calculate A3C’s loss function(Equation (3) and (4)).
在本节中,我们描述了强化学习(RL)元素如何与策略优化算法协作,通过状态转换构建基于查询的攻击,如图 2 所示。从任意当前状态 s t s t s_(t)s_{t} 开始,编码器模型将其作为输入,并输出对应的特征给演员和批评者。随后,从演员输出的策略图 P t P t P_(t)\boldsymbol{P}_{\boldsymbol{t}} 中采样动作图 A t A t A_(t)\boldsymbol{A}_{\boldsymbol{t}} ,而价值图 V t V t V_(t)\boldsymbol{V}_{\boldsymbol{t}} 则由批评者直接生成。经过状态转换 T ( s t + 1 s t , A t ) T s t + 1 s t , A t T(s_(t+1)∣s_(t),A_(t))T\left(s_{t+1} \mid s_{t}, \boldsymbol{A}_{\boldsymbol{t}}\right) 后,通过计算奖励函数(方程(9))获得奖励图 R t R t R_(t)\boldsymbol{R}_{t} 。在训练过程中,使用 6 个连续状态转换生成的 V t V t V_(t)\boldsymbol{V}_{\boldsymbol{t}} R t R t R_(t)\boldsymbol{R}_{\boldsymbol{t}} 来计算 A3C 的损失函数(方程(3)和(4))。
In the testing procedure, the number of state transitions may vary. To ensure that RLGC maximizes the distance between the predicted mask and ground truth, we terminate state transition procedure when the attack performance of next state is worse than that of current state. We utilize the F1-score as the evaluation metric for our attack performance. On the other hand, considering that longer state transition procedures tend to result in more severe image distortions, we have set a threshold for the decline in F1-score between current and next states, which is fixed at 0.02 . In other words, if the difference in F1-score between the current and next state exceeds 0.02, state transition procedure will continue. Otherwise, state transition procedure will be terminated, and we will consider current state as the terminal state. The corresponding inpainting image generated at the terminal state will be deemed as the optimal attacked sample for target forensics methods. Furthermore, it is important to note that, during the first two state transitions, termination will not occur, as small perturbations during this early stage may not result in stable attack performance.
在测试过程中,状态转换的数量可能有所不同。为了确保 RLGC 能够最大化预测口罩与真实口罩之间的距离,当下一状态的攻击性能低于当前状态时,我们终止状态转换过程。我们采用 F1 分数作为评估攻击性能的指标。另一方面,考虑到更长的状态转换过程可能导致更严重的图像失真,我们为当前状态与下一状态之间的 F1 分数下降设定了阈值,该阈值固定为 0.02。换言之,若当前状态与下一状态的 F1 分数差异超过 0.02,状态转换过程将继续进行。否则,状态转换过程将终止,并将当前状态视为终态。在终态生成的对应修复图像将被视为目标取证方法的优化攻击样本。此外,需要特别注意的是,在前两次状态转换过程中不会触发终止,因为早期阶段的小幅扰动可能无法稳定攻击性能。

Experiments  实验

Experimental Setup  实验装置

Dataset In black-box attack, the dataset settings are typically undisclosed to attackers. To showcase the effectiveness of RLGC in this scenario, we utilized two distinct datasets, which were introduced by IID-Net (Wu and Zhou 2022), for inpainting forensics methods and RLGC as follows:
数据集 在黑盒攻击中,数据集的设置通常不会向攻击者披露。为了展示 RLGC 在这种场景下的有效性,我们使用了 IID-Net(Wu 和 Zhou 2022)提出的两个不同的数据集,用于图像修复取证方法和 RLGC,具体如下:
Dataset for Inpainting Forensics Methods: It is denoted as D F D F D_(F)\mathcal{D}_{F}, which contains 48,000 pairs of inpainting images and ground-truth masks. The original images come from the Places dataset (JPEG lossy compression)(Zhou et al. 2017) or the Dresden dataset (NEF lossless compression)(Gloe and Böhme 2010) with a proportion of 1 : 1 1 : 1 1:11: 1. The masks are randomly sampled from (Liu et al. 2018), and all the inpainting images are generated by CA ( CA ( CA(\mathrm{CA}( Yu et al. 2018).
图像修复取证方法数据集:该数据集标记为 D F D F D_(F)\mathcal{D}_{F} ,包含 48,000 组修复图像及其对应的真实标签掩码。原始图像来自 Places 数据集(JPEG 有损压缩)(Zhou et al. 2017)或 Dresden 数据集(NEF 无损压缩)(Gloe and Böhme 2010),比例为 1 : 1 1 : 1 1:11: 1 。掩码随机采样自(Liu et al. 2018),所有图像修复数据由 CA ( CA ( CA(\mathrm{CA}( Yu et al. 2018 生成。
Dataset for RLGC: It is denoted as D A D A D_(A)\mathcal{D}_{A}, which contains 11,000 pairs of inpainting images and ground-truth masks. Its original images come from two additional datasets, CelabA(Karras et al. 2018) and ImageNet(Deng et al. 2009). And eleven different representative inpainting methods are used to generate inpainting images, including seven deep
RLGC 数据集:该数据集标记为 D A D A D_(A)\mathcal{D}_{A} ,包含 11,000 对修复图像及其对应的真实标签。原始图像来自两个额外数据集:CelabA(Karras 等,2018)和 ImageNet(Deng 等,2009)。此外,使用了 11 种不同的代表性图像修复方法来生成图像修复样本,其中包括 7 种深度学习方法。

Figure 3: The query times required for RLGC.
图 3:RLGC 所需的查询时间。

learning-based ones proposed in recent years (CA(Yu et al. 2018), GC(Yu et al. 2019), SH(Yan et al. 2018), EC(Nazeri et al. 2019), LB(Wu, Zhou, and Li 2021), RN(Yu et al. 2020), and LR(Guo et al. 2017)), and four traditional ones (TE(Telea 2004), NS(Bertalmio, Bertozzi, and Sapiro 2001), PM(Herling and Broll 2014), and SG(Huang et al. 2014)). Note that TE and NS were published before 2005, but they have been included in the OpenCV extension package as the built-in default inpainting methods, indicating their wide usage and the meaningfulness of the results based on them. The proportion of training, validating and testing is 4 : 1 : 5 4 : 1 : 5 4:1:54: 1: 5.
近年来提出的基于学习的方法(CA(Yu 等,2018),GC(Yu 等,2019),SH(Yan 等,2018),EC(Nazeri 等,2019),LB(Wu、Zhou 和 Li,2021),RN(Yu 等,2020)和 LR(Guo et al. 2017)),以及四种传统方法(TE(Telea 2004)、NS(Bertalmio, Bertozzi, and Sapiro 2001)、PM(Herling and Broll 2014) 和 SG(Huang et al. 2014))。需注意,TE 和 NS 方法发表于 2005 年之前,但已被纳入 OpenCV 扩展包作为内置默认修复方法,这表明其广泛应用及基于这些方法所得结果的意义。训练集、验证集和测试集的比例为 4 : 1 : 5 4 : 1 : 5 4:1:54: 1: 5

Attack Comparison  攻击对比

To conduct a comprehensive comparison, we evaluated the attack performance of RLGC (query-based black-box attack method with up to 6 query times) against two other attack methods: FGSM(Goodfellow, Shlens, and Szegedy 2015)(gradient-based white-box attack method) and Square Attack(Andriushchenko et al. 2020)(query-based black-box attack method with up to 250 query times). And the maximal magnitude of attack perturbation was set to 4 for FGSM and RLGC, while it was 50 for Square Attack. From Table 1, it is evident that both RLGC and FGSM outperform Square Attack by significant margin. When comparing FGSM and RLGC, despite RLGC operating in a black-box manner and FGSM in a white-box manner, RLGC consistently achieves better attack performance in almost all scenarios. These results demonstrate that RLGC not only provides a robust attack mechanism but also does so with fewer queries, making it an efficient and effective method for compromising image inpainting forensics methods and query-based attack defense method(Li et al. 2022).
为了进行全面比较,我们评估了 RLGC(基于查询的黑盒攻击方法,最多支持 6 次查询)与另外两种攻击方法的攻击性能:FGSM(Goodfellow、Shlens 和 Szegedy,2015)(基于梯度的白盒攻击方法)和 Square Attack(Andriushchenko 等,2020)(基于查询的黑盒攻击方法,最多支持 250 次查询)。FGSM 和 RLGC 的最大攻击扰动幅度设置为 4,而 Square Attack 为 50。如表 1 所示,RLGC 和 FGSM 均显著优于 Square Attack。在比较 FGSM 和 RLGC 时,尽管 RLGC 采用黑盒攻击方式而 FGSM 采用白盒攻击方式,但 RLGC 在几乎所有场景下均表现出更优的攻击性能。这些结果表明,RLGC 不仅提供了一种健壮的攻击机制,而且以更少的查询次数实现,使其成为一种高效且有效的方法,用于破坏图像修复取证方法和基于查询的攻击防御方法(Li et al. 2022)。

Evaluation of Query Efficiency
查询效率评估

To assess the query efficiency, we recorded the number of query times required for RLGC to generate the final attacked inpainting images against different forensics methods. The results are presented in Fig. 3. In Fig. 3, the x-axis represents query times to attack, while the y -axis represents the number of images in testing set of D A D A D_(A)\mathcal{D}_{A}. It can be observed
为了评估查询效率,我们记录了 RLGC 在面对不同取证方法时,生成最终攻击性修复图像所需的查询次数。结果如图 3 所示。在图 3 中,x 轴代表攻击所需的查询次数,y 轴代表测试集中的图像数量。可以观察到
Forensics Methods  法医学方法 Metrics  指标 Original Results  原始结果 Anti-Forensics Methods  反取证方法 Attacked Results  攻击结果
FGSM
25.92% ( 45.79 % 45.79 % darr45.79%\downarrow 45.79 \% )
FGSM 25.92% ( darr45.79% )| FGSM | | :--- | | 25.92% ( $\downarrow 45.79 \%$ ) |

71.71% 斯奎尔攻击 31 . 34 % ( 40.37 % ) 31 . 34 % ¯ ( 40.37 % ¯ ) 31. bar(34%)(darr bar(40.37%))31 . \overline{34 \%}(\downarrow \overline{40.37 \%}) F1 分数
71.71%
Squāre Āttack
31 . 34 % ( 40.37 % ) 31 . 34 % ¯ ( 40.37 % ¯ ) 31. bar(34%)(darr bar(40.37%))31 . \overline{34 \%}(\downarrow \overline{40.37 \%})
F1-score
71.71% Squāre Āttack 31. bar(34%)(darr bar(40.37%)) F1-score| 71.71% | | :--- | | Squāre Āttack | | $31 . \overline{34 \%}(\downarrow \overline{40.37 \%})$ | | F1-score |
RLḠC
2 4 . 4 5 % ( 47.26 % ) 2 4 . 4 5 % ( 47.26 % ) 24.45%(sqrt(47.26%))\mathbf{2} \mathbf{4 . 4 5 \%}(\sqrt{47.26 \%})
RLḠC 24.45%(sqrt(47.26%))| RLḠC | | :--- | | $\mathbf{2} \mathbf{4 . 4 5 \%}(\sqrt{47.26 \%})$ |
qquad\qquad
FGSM
16.76 % 16.76 % 16.76%16.76 \% ( 45.37 % 45.37 % sqrt(45.37%)\sqrt{45.37 \%} )
qquad FGSM 16.76% ( sqrt(45.37%) )| $\qquad$ | | :--- | | FGSM | | $16.76 \%$ ( $\sqrt{45.37 \%}$ ) |
Li-Net IOU 62.13% 24.22 % ( 37.91 % ) 24.22 % ( 37.91 % ) 24.22%(sqrt(37.91%))24.22 \%(\sqrt{37.91 \%)}
RLḠC 1 6 . 1 5 % ( 4 5 . 9 8 % ) 1 6 . 1 5 % ( 4 5 . 9 8 % ) 16.15%(sqrt(45.98%))\mathbf{1} \mathbf{6 . 1 5 \%}(\sqrt{\mathbf{4 5 . 9 8} \%)}
AUC 83.13% FGSM 62 . 0 8 % ( 21 . 0 5 % ) 62 . 0 ¯ 8 % ( 21 . 0 ¯ 5 % ) 62. bar(0)8%(sqrt21. bar(0)5%)62 . \overline{0} 8 \%(\sqrt{21} . \overline{0} 5 \%)
70.02 % 70.02 % 70.02%70.02 \% ( 13.1 1 % 13.1 1 ¯ % darr13.1 bar(1)%\downarrow 13.1 \overline{1} \% )
FGSM 6 1 . 5 2 % ( Φ 2 1 . 6 1 % ) 6 1 . 5 2 % ( Φ 2 1 . 6 1 % ) 61.52%(Phi21.61%)\mathbf{6} \mathbf{1 . 5 2 \% ( ~} \boldsymbol{\Phi} \mathbf{2 1 . 6 1 \% )}
2 2 . 4 0 % ( 62 . 4 5 % ) 2 2 ¯ . 4 ¯ 0 % ( 62 . 4 ¯ 5 % ) 2 bar(2). bar(4)0%(sqrt62. bar(4)5%)2 \overline{2} . \overline{4} 0 \%(\sqrt{62} . \overline{4} 5 \%)
84.85%
- - - 'Sqūāre Āttack
52.82 % ( 32.03 % ) 52.82 % ( 32.03 % ) 52.82%(sqrt(32.03%))52.82 \%(\sqrt{32.03 \%})
F1-score
84.85% - - - 'Sqūāre Āttack 52.82%(sqrt(32.03%)) F1-score| 84.85% | | :--- | | - - - 'Sqūāre Āttack | | $52.82 \%(\sqrt{32.03 \%})$ | | F1-score |
RLḠC
2 1 . 3 3 % ( 6 3 . 5 2 % ) 2 1 ¯ . 3 ¯ 3 % ( 6 3 . 5 2 % ) 2 bar(1). bar(3)3%(sqrt63.52%)\mathbf{2} \overline{1} . \overline{3} \mathbf{3} \%(\sqrt{\mathbf{6}} \mathbf{3 . 5 2} \%)
RLḠC 2 bar(1). bar(3)3%(sqrt63.52%)| RLḠC | | :--- | | $\mathbf{2} \overline{1} . \overline{3} \mathbf{3} \%(\sqrt{\mathbf{6}} \mathbf{3 . 5 2} \%)$ |
FGSM
15.78 % ( 63.54 % ) 15.78 % ( 63.54 % ) 15.78%(sqrt(63.54%))15.78 \%(\sqrt{63.54 \%})
FGSM 15.78%(sqrt(63.54%))| FGSM | | :--- | | $15.78 \%(\sqrt{63.54 \%})$ |
IID-Net IOU 78.32% - - - - Squāre Āttack
- - - - 斯奎尔·阿塔克
40 . 0 0 % ( 38.32 % ) 40 . 0 ¯ 0 % ( 38.32 % ) 40. bar(0)0%(sqrt38.32%)40 . \overline{0} 0 \%(\sqrt{38.32} \%)
- - - - - R L G C R ¯ L ¯ G ¯ C ¯ bar(R) bar(L) bar(G) bar(C)\overline{\mathrm{R}} \overline{\mathrm{L}} \overline{\mathrm{G}} \overline{\mathrm{C}} 1 4 . 9 3 % 1 ¯ 4 ¯ . 9 ¯ 3 % bar(1) bar(4). bar(9)3%\overline{1} \overline{4} . \overline{9} 3 \% ( 6 3 . 39 % 6 ¯ 3 . 39 ¯ % darr bar(6)3. bar(39)%\downarrow \overline{6} 3 . \overline{39} \% )
AUC
98.21%
AUC 98.21%| AUC | | :--- | | 98.21% |
- - - - - F GS GM F ¯ GS ¯ GM ¯ bar(F) bar(GS) bar(GM)\overline{\mathrm{F}} \overline{\mathrm{GS}} \overline{\mathrm{GM}} 59.93 % ( 38.28 % ) 59.93 % ( 38.28 % ) 59.93%(sqrt38.28%)59.93 \%(\sqrt{38.28} \%)
- - - - Sqūuare Āttāck
- - - - 斯奎尔·阿塔克
9 2.65 % ( 5.56 % ) 9 ¯ 2.65 % ( 5.56 % ) bar(9)2.65%(✓5.56%)\overline{9} 2.65 \%(\checkmark 5.56 \%)
- - - - R L G C R ¯ L ¯ G ¯ C ¯ bar(R) bar(L) bar(G) bar(C)\overline{\mathrm{R}} \overline{\mathrm{L}} \overline{\mathrm{G}} \overline{\mathrm{C}} 61 . 4 4 % 61 . 4 ¯ 4 % 61. bar(4)4%61 . \overline{4} 4 \% ( 36.77 % 36.77 % sqrt(36.77%)\sqrt{36.77 \%} )
2 9 . 8 9 % ( 55.1 8 % ) 2 9 ¯ . 8 ¯ 9 % ( 55.1 8 ¯ % ) 2 bar(9). bar(8)9%(sqrt55.1 bar(8)%)2 \overline{9} . \overline{8} 9 \%(\sqrt{55.1} \overline{8} \%)
F1-score  F1 得分 85.07% - - - 'Sqūāre Āttack 43.78 % 43.78 % 43.78%43.78 \% ( 41 .2 9 % 41 .2 9 ¯ % sqrt41.2 bar(9)%\sqrt{41} .2 \overline{9} \% )
RLḠC 2 1 . 7 9 % ( d 6 3 . 2 8 % 2 1 . 7 9 % ( d 6 3 . 2 8 % 21.79%(d63.28%\mathbf{2} \mathbf{1 . 7 9 \% ( ~} \boldsymbol{d} \mathbf{6 3 . 2 8 \%} )
IOU 79.56% FGSM 20 . 0 1 % 20 . 0 ¯ 1 % 20. bar(0)1%20 . \overline{0} 1 \% ( 59.55 % 59.55 % sqrt(59.55%)\sqrt{59.55 \%} )
Yang-Net  杨网 - - - -Sqūare Āttack
- - - -方块攻击
35.64 % ( 43.92 % ) 35.64 % ( 43.92 % ) 35.64%(✓43.92%)35.64 \%(\checkmark 43.92 \%)
- - - - R L G C R ¯ L ¯ G ¯ C ¯ bar(R) bar(L) bar(G) bar(C)\overline{\mathrm{R}} \overline{\mathrm{L}} \overline{\mathrm{G}} \overline{\mathrm{C}} - 1 1 4 . 4 2 1 1 4 . 4 2 ¯ 1 bar(14.42)\mathbf{1} \overline{\mathbf{1 4 . 4 2}} ( 6 5 5 . 1 4 6 5 5 . 1 4 ¯ darr bar(655.14)\downarrow \overline{\mathbf{6 5 5 . 1 4}} %)
AUC 95.58% FGSM 74 . 0 8 % ( 21.50 % ) 74 . 0 ¯ 8 % ( 21.50 % ) 74. bar(0)8%(sqrt(21.50%))74 . \overline{0} 8 \%(\sqrt{21.50 \%})
- - - 'Squāre Āttack 82.91 % 82.91 % 82.91%82.91 \% ( 12.67 % 12.67 % darr12.67%\downarrow 12.67 \% )
RLḠC 5 9 . 6 8 % ( 3 5 . 9 0 % 5 9 . 6 8 % ( 3 5 . 9 0 % 59.68%(sqrt35.90%\mathbf{5 9 . 6 8 \% ( ~} \sqrt{\mathbf{3 5 . 9 0 \%}} )
Forensics Methods Metrics Original Results Anti-Forensics Methods Attacked Results "FGSM 25.92% ( darr45.79% )" "71.71% Squāre Āttack 31. bar(34%)(darr bar(40.37%)) F1-score" "RLḠC 24.45%(sqrt(47.26%))" "qquad FGSM 16.76% ( sqrt(45.37%) )" Li-Net IOU 62.13% 24.22%(sqrt(37.91%)) RLḠC 16.15%(sqrt(45.98%)) AUC 83.13% FGSM 62. bar(0)8%(sqrt21. bar(0)5%) 70.02% ( darr13.1 bar(1)% ) FGSM 61.52%(Phi21.61%) 2 bar(2). bar(4)0%(sqrt62. bar(4)5%) "84.85% - - - 'Sqūāre Āttack 52.82%(sqrt(32.03%)) F1-score" "RLḠC 2 bar(1). bar(3)3%(sqrt63.52%)" "FGSM 15.78%(sqrt(63.54%))" IID-Net IOU 78.32% - - - - Squāre Āttack 40. bar(0)0%(sqrt38.32%) - - - - - bar(R) bar(L) bar(G) bar(C) bar(1) bar(4). bar(9)3% ( darr bar(6)3. bar(39)% ) "AUC 98.21%" - - - - - bar(F) bar(GS) bar(GM) 59.93%(sqrt38.28%) - - - - Sqūuare Āttāck bar(9)2.65%(✓5.56%) - - - - bar(R) bar(L) bar(G) bar(C) 61. bar(4)4% ( sqrt(36.77%) ) 2 bar(9). bar(8)9%(sqrt55.1 bar(8)%) F1-score 85.07% - - - 'Sqūāre Āttack 43.78% ( sqrt41.2 bar(9)% ) RLḠC 21.79%(d63.28% ) IOU 79.56% FGSM 20. bar(0)1% ( sqrt(59.55%) ) Yang-Net - - - -Sqūare Āttack 35.64%(✓43.92%) - - - - bar(R) bar(L) bar(G) bar(C) - 1 bar(14.42) ( darr bar(655.14) %) AUC 95.58% FGSM 74. bar(0)8%(sqrt(21.50%)) - - - 'Squāre Āttack 82.91% ( darr12.67% ) RLḠC 59.68%(sqrt35.90% )| Forensics Methods | Metrics | Original Results | Anti-Forensics Methods | Attacked Results | | :--- | :--- | :--- | :--- | :--- | | FGSM <br> 25.92% ( $\downarrow 45.79 \%$ ) | | | | | | 71.71% <br> Squāre Āttack <br> $31 . \overline{34 \%}(\downarrow \overline{40.37 \%})$ <br> F1-score | | | | | | RLḠC <br> $\mathbf{2} \mathbf{4 . 4 5 \%}(\sqrt{47.26 \%})$ | | | | | | $\qquad$ <br> FGSM <br> $16.76 \%$ ( $\sqrt{45.37 \%}$ ) | | | | | | Li-Net | IOU | 62.13% | | $24.22 \%(\sqrt{37.91 \%)}$ | | | | | RLḠC | $\mathbf{1} \mathbf{6 . 1 5 \%}(\sqrt{\mathbf{4 5 . 9 8} \%)}$ | | | AUC | 83.13% | FGSM | $62 . \overline{0} 8 \%(\sqrt{21} . \overline{0} 5 \%)$ | | | | | | $70.02 \%$ ( $\downarrow 13.1 \overline{1} \%$ ) | | | | | FGSM | $\mathbf{6} \mathbf{1 . 5 2 \% ( ~} \boldsymbol{\Phi} \mathbf{2 1 . 6 1 \% )}$ | | $2 \overline{2} . \overline{4} 0 \%(\sqrt{62} . \overline{4} 5 \%)$ | | | | | | 84.85% <br> - - - 'Sqūāre Āttack <br> $52.82 \%(\sqrt{32.03 \%})$ <br> F1-score | | | | | | RLḠC <br> $\mathbf{2} \overline{1} . \overline{3} \mathbf{3} \%(\sqrt{\mathbf{6}} \mathbf{3 . 5 2} \%)$ | | | | | | FGSM <br> $15.78 \%(\sqrt{63.54 \%})$ | | | | | | IID-Net | IOU | 78.32% | - - - - Squāre Āttack | $40 . \overline{0} 0 \%(\sqrt{38.32} \%)$ | | | | | - - - - - $\overline{\mathrm{R}} \overline{\mathrm{L}} \overline{\mathrm{G}} \overline{\mathrm{C}}$ | $\overline{1} \overline{4} . \overline{9} 3 \%$ ( $\downarrow \overline{6} 3 . \overline{39} \%$ ) | | | AUC <br> 98.21% | | - - - - - $\overline{\mathrm{F}} \overline{\mathrm{GS}} \overline{\mathrm{GM}}$ | $59.93 \%(\sqrt{38.28} \%)$ | | | | | - - - - Sqūuare Āttāck | $\overline{9} 2.65 \%(\checkmark 5.56 \%)$ | | | | | - - - - $\overline{\mathrm{R}} \overline{\mathrm{L}} \overline{\mathrm{G}} \overline{\mathrm{C}}$ | $61 . \overline{4} 4 \%$ ( $\sqrt{36.77 \%}$ ) | | | | | | $2 \overline{9} . \overline{8} 9 \%(\sqrt{55.1} \overline{8} \%)$ | | | F1-score | 85.07% | - - - 'Sqūāre Āttack | $43.78 \%$ ( $\sqrt{41} .2 \overline{9} \%$ ) | | | | | RLḠC | $\mathbf{2} \mathbf{1 . 7 9 \% ( ~} \boldsymbol{d} \mathbf{6 3 . 2 8 \%}$ ) | | | IOU | 79.56% | FGSM | $20 . \overline{0} 1 \%$ ( $\sqrt{59.55 \%}$ ) | | Yang-Net | | | - - - -Sqūare Āttack | $35.64 \%(\checkmark 43.92 \%)$ | | | | | - - - - $\overline{\mathrm{R}} \overline{\mathrm{L}} \overline{\mathrm{G}} \overline{\mathrm{C}}$ - | $\mathbf{1} \overline{\mathbf{1 4 . 4 2}}$ ( $\downarrow \overline{\mathbf{6 5 5 . 1 4}}$ %) | | | AUC | 95.58% | FGSM | $74 . \overline{0} 8 \%(\sqrt{21.50 \%})$ | | | | | - - - 'Squāre Āttack | $82.91 \%$ ( $\downarrow 12.67 \%$ ) | | | | | RLḠC | $\mathbf{5 9 . 6 8 \% ( ~} \sqrt{\mathbf{3 5 . 9 0 \%}}$ ) |
Table 1: Attack performance of different anti-forensics methods against state-of-the-art forensics models.
表 1:不同反取证方法对最新取证模型的攻击性能。

that most of the images only require 2 query times to generate their final attack inpainting images, whose percentage is 3 , 953 / 5 , 500 = 71.87 % 3 , 953 / 5 , 500 = 71.87 % 3,953//5,500=71.87%3,953 / 5,500=71.87 \%. Furthermore, we have also calculated the average number of query times, which is 2.44 . This indicates that RLGC exhibits a extremely low query cost while achieving excellent attack performance. Based on these results, we can conclude that RLGC is a highly query-efficient anti-forensics framework for attack different forensics methods in black-box scenario.
大多数图像仅需 2 次查询即可生成最终的攻击修复图像,其比例为 3 , 953 / 5 , 500 = 71.87 % 3 , 953 / 5 , 500 = 71.87 % 3,953//5,500=71.87%3,953 / 5,500=71.87 \% 。此外,我们还计算了平均查询次数,结果为 2.44。这表明 RLGC 在实现卓越攻击性能的同时,展现出极低的查询成本。基于这些结果,我们可以得出结论:RLGC 是一种在黑盒场景下针对不同取证方法进行攻击的高查询效率反取证框架。

Visual Analysis  视觉分析

To better compare the attack performance of RLGC with other comparative attack methods, we conducted a visual analysis on the predicted mask outputted by IID-Net. The results are presented in Fig. 4. Both FGSM and RLGC significantly disturbed the predicted masks compared to corresponding ground truth masks. However, Square Attack’s attack performance was found to be unstable. For RLGC and FGSM, although the evaluation of attack performance in Table 1 with metrics of F1-score, IOU, and AUC suggests that RLGC’s superiority over FGSM may not be substantial, the visual analysis reveals significant differences between them. For instance, as depicted in Fig. 4, the attack effect caused by FGSM classifies most pixels as inpainting pixels, resulting in obviously larger inpainting regions in the corresponding predicted masks than the original regions. This indicates that FGSM attack forensics methods by causing the higher
为了更好地比较 RLGC 与其他比较攻击方法的攻击性能,我们对 IID-Net 预测的掩码进行了可视化分析。结果如图 4 所示。与对应的真实掩码相比,FGSM 和 RLGC 均显著扰乱了预测的掩码。然而,Square Attack 的攻击性能被发现不稳定。对于 RLGC 和 FGSM,尽管表 1 中基于 F1 分数、IOU 和 AUC 指标的攻击性能评估表明 RLGC 相较于 FGSM 的优势可能并不显著,但视觉分析揭示了两者之间存在显著差异。例如,如图 4 所示,FGSM 攻击将大多数像素分类为填充像素,导致对应预测掩码中的填充区域明显大于原始区域。这表明 FGSM 攻击取证方法通过引发更高的

false alarm rate. Conversely, RLGC prefers to classify most pixels as original pixels, resulting in larger original regions in the predicted masks. Importantly, in the context of antiforensics attack, the primary goal is to conceal inpainting regions while preserving the original regions in predicted masks. Therefore, we argue that RLGC aligns more closely with actual anti-forensics goals compared to FGSM.
误报率。相反,RLGC 倾向于将大多数像素分类为原始像素,导致预测掩码中的原始区域更大。重要的是,在反取证攻击的背景下,主要目标是隐藏修复区域的同时保留预测掩码中的原始区域。因此,我们认为 RLGC 与实际反取证目标的契合度更高,相比于 FGSM。
Forensics Methods  法医学方法 PSNR SSIM
Li-Net 42.69 0.9798
IID-Net -42.58 0.978 9 0.978 9 ¯ -0.978 bar(9)-0.978 \overline{9}
Yang-Net  杨网 -42.50 0.975 6 0.975 6 ¯ -0.975 bar(6)-0.975 \overline{6}
Forensics Methods PSNR SSIM Li-Net 42.69 0.9798 IID-Net -42.58 -0.978 bar(9) Yang-Net -42.50 -0.975 bar(6)| Forensics Methods | PSNR | SSIM | | :---: | :---: | :---: | | Li-Net | 42.69 | 0.9798 | | IID-Net | -42.58 | $-0.978 \overline{9}$ | | Yang-Net | -42.50 | $-0.975 \overline{6}$ |
Table 2: Image quality of attack images generated by RLGC.
表 2:RLGC 生成的攻击图像的图像质量。

Moreover, image distortion caused by the attack of RLGC is not visually noticeable in Fig. 4. It achieves by the fact that image quality is directly associated with query efficiency in RLGC, as each query time introduces modifications of { 1 , + 1 , 0 } { 1 , + 1 , 0 } {-1,+1,0}\{-1,+1,0\} to the attack images while its average number of query times is 2.44. To further validate the quality of RLGC’s attack images, we conducted image quality assessment with metrics of Peak Signal to Noise Ratio (PSNR) and Structure Similarity Index Measure (SSIM). The average PSNR and SSIM scores between attack images generated by RLGC and original images are shown in Table 2. The results demonstrate RLGC achieves excellent image quality after assigning perturbations on attack images. Based on
此外,RLGC 攻击引起的图像失真在图 4 中肉眼不可见。这是因为在 RLGC 中,图像质量与查询效率直接相关,每次查询都会对攻击图像引入 { 1 , + 1 , 0 } { 1 , + 1 , 0 } {-1,+1,0}\{-1,+1,0\} 的修改,而其平均查询次数为 2.44。为了进一步验证 RLGC 攻击图像的质量,我们使用峰值信噪比(PSNR)和结构相似性指数(SSIM)指标对图像质量进行了评估。RLGC 生成的攻击图像与原始图像之间的平均 PSNR 和 SSIM 分数如表 2 所示。结果表明,在对攻击图像施加扰动后,RLGC 实现了卓越的图像质量。基于

Figure 4: The visualization of inpainting images and its corresponding masks outputted by IID-Net.
图 4:IID-Net 生成的图像修复结果及其对应的掩码。
Training On  培训于 F1-score  F1 得分 IOU AUC
D NS D NS  D_("NS ")\mathcal{D}_{\text {NS }} 22.13% 15.63% 64.56%
D T E D ¯ T E bar(D)_(TE)\overline{\mathcal{D}}_{T E} 2 4 .2 2 % 2 ¯ 4 ¯ .2 2 ¯ % bar(2) bar(4).2 bar(2)%\overline{2} \overline{4} .2 \overline{2} \% 1 7 . 31 1 ¯ 7 ¯ . 31 ¯ bar(1) bar(7). bar(31)\overline{1} \overline{7} . \overline{31} % 71.47%
D P M D P M ¯ bar(D_(PM))\overline{\mathcal{D}_{P M}} 24.3 6 % 24.3 6 ¯ % ¯ bar(24.3 bar(6)%)\overline{24.3 \overline{6} \%} 19.13 % 19.13 % 19.13%19.13 \% 72.9 3 % 72.9 3 ¯ % ¯ bar(72.9 bar(3)%)\overline{72.9 \overline{3} \%}
D S G D ¯ S G ^(-)^(-) bar(D)_(SG)^(-){ }^{-}{ }^{-} \overline{\mathcal{D}}_{S G}^{-} 24.19% 17.33% 69.33%
D L R D L R ¯ bar(D_(LR))\overline{\mathcal{D}_{L R}} 22.42% 15.93% 62 .4 0 % 62 ¯ .4 0 ¯ % bar(62).4 bar(0)%\overline{62} .4 \overline{0} \%
D C A D C A ¯ bar(D_(CA))\overline{\mathcal{D}_{C A}} 23.42% 16.67% 68.78%
D S H D ¯ S H ^(-) bar(D)_(SH){ }^{-} \overline{\mathcal{D}}_{S H} 24.06% 17.40% 71.84 % 71.84 % ¯ bar(71.84%)\overline{71.84 \%}
D E C D ¯ E C bar(D)_(EC)\overline{\mathcal{D}}_{E C} 23.97 % 23.97 % 23.97%23.97 \% 17.30% 7 1 . 7 0 7 ¯ 1 ¯ . 7 ¯ 0 ¯ bar(7) bar(1). bar(7) bar(0)\overline{7} \overline{1} . \overline{7} \overline{0} %
D ¯ G C D ¯ G C bar(D)_(GC)\bar{D}_{G C} 2 4.6 9 % 2 ¯ 4.6 9 ¯ % bar(2)4.6 bar(9)%\overline{2} 4.6 \overline{9} \% 17.78 % 17.78 % 17.78%17.78 \% 69.87%
D R N D R N ¯ bar(D_(RN))\overline{\mathcal{D}_{R N}} 23.96% 17.33% 72.07%
D L B ^ D L B ^ widehat(D_(LB))\widehat{\mathcal{D}_{L B}} 25.52% 18.68% 72.59%
D A D A D_(A)\mathcal{D}_{A} 21.33% 14.93% 61.44%
Training On F1-score IOU AUC D_("NS ") 22.13% 15.63% 64.56% bar(D)_(TE) bar(2) bar(4).2 bar(2)% bar(1) bar(7). bar(31) % 71.47% bar(D_(PM)) bar(24.3 bar(6)%) 19.13% bar(72.9 bar(3)%) ^(-)^(-) bar(D)_(SG)^(-) 24.19% 17.33% 69.33% bar(D_(LR)) 22.42% 15.93% bar(62).4 bar(0)% bar(D_(CA)) 23.42% 16.67% 68.78% ^(-) bar(D)_(SH) 24.06% 17.40% bar(71.84%) bar(D)_(EC) 23.97% 17.30% bar(7) bar(1). bar(7) bar(0) % bar(D)_(GC) bar(2)4.6 bar(9)% 17.78% 69.87% bar(D_(RN)) 23.96% 17.33% 72.07% widehat(D_(LB)) 25.52% 18.68% 72.59% D_(A) 21.33% 14.93% 61.44%| Training On | F1-score | IOU | AUC | | :--- | :--- | :--- | :--- | | $\mathcal{D}_{\text {NS }}$ | 22.13% | 15.63% | 64.56% | | $\overline{\mathcal{D}}_{T E}$ | $\overline{2} \overline{4} .2 \overline{2} \%$ | $\overline{1} \overline{7} . \overline{31}$ % | 71.47% | | $\overline{\mathcal{D}_{P M}}$ | $\overline{24.3 \overline{6} \%}$ | $19.13 \%$ | $\overline{72.9 \overline{3} \%}$ | | ${ }^{-}{ }^{-} \overline{\mathcal{D}}_{S G}^{-}$ | 24.19% | 17.33% | 69.33% | | $\overline{\mathcal{D}_{L R}}$ | 22.42% | 15.93% | $\overline{62} .4 \overline{0} \%$ | | $\overline{\mathcal{D}_{C A}}$ | 23.42% | 16.67% | 68.78% | | ${ }^{-} \overline{\mathcal{D}}_{S H}$ | 24.06% | 17.40% | $\overline{71.84 \%}$ | | $\overline{\mathcal{D}}_{E C}$ | $23.97 \%$ | 17.30% | $\overline{7} \overline{1} . \overline{7} \overline{0}$ % | | $\bar{D}_{G C}$ | $\overline{2} 4.6 \overline{9} \%$ | $17.78 \%$ | 69.87% | | $\overline{\mathcal{D}_{R N}}$ | 23.96% | 17.33% | 72.07% | | $\widehat{\mathcal{D}_{L B}}$ | 25.52% | 18.68% | 72.59% | | $\mathcal{D}_{A}$ | 21.33% | 14.93% | 61.44% |
Table 3: The location performance of RLGC with single training inpainting method against IID-Net.
表 3:RLGC 在单次训练填充方法下与 IID-Net 的定位性能对比。

these observations, we can conclude that the generated attack images of RLGC are not visually distinguishable compared with original images by human eyes, making RLGC’s attacks more covert.
通过这些观察结果,我们可以得出结论:RLGC 生成的攻击图像与原始图像在视觉上无法被人类肉眼区分,这使得 RLGC 的攻击更加隐蔽。

Limited Training Scenario
有限训练场景

In this section, the effectiveness of RLGC is evaluated with limitation of inpainting method in training dataset. For example, we selected the images generated by inpainting method of GC, denoted as D G C D G C D_(GC)\mathcal{D}_{G C}, which contains a total of 1,000 inpainting images. We use only 400 images for training, 100 images for validation, and the remaining 500 im 500 im 500im-500 \mathrm{im}- ages and the other 10,000 inpainting images not generated by GC, for testing. Additionally, we reduce the number of training iterations, which is only 300 overall and one welltrained model is save for each 50 iterations. In this context,
在本节中,我们评估了 RLGC 在训练数据集上受限于图像修复方法的有效性。例如,我们选取了 GC 图像修复方法生成的图像,标记为 D G C D G C D_(GC)\mathcal{D}_{G C} ,共包含 1,000 张修复图像。我们仅使用 400 张图像进行训练,100 张图像用于验证,剩余的 500 im 500 im 500im-500 \mathrm{im}- 张图像以及其他 10,000 张未由 GC 生成的插值图像用于测试。此外,我们减少了训练迭代次数,总共仅进行 300 次迭代,并在每 50 次迭代后保存一个训练好的模型。在此背景下,
RLGC’s attack results are shown in Table 3.
RLGC 的攻击结果如表 3 所示。

From Table 3, we find that RLGC still achieves remarkable attack performance against IID-Net. For example, the IOU scores of all training subsets are distributed in the interval of 15 % 15 % 15%15 \% to 20 % 20 % 20%20 \%. These results highlight the reliable generalization capability of RLGC for mismatched inpainting methods between training and testing datasets. It is crucial for real-world applications since there are always other inpainting methods that are not included in training datasets.
从表 3 中可以看出,RLGC 在对抗 IID-Net 时仍能取得显著的攻击性能。例如,所有训练子集的 IOU 分数分布在 15 % 15 % 15%15 \% 20 % 20 % 20%20 \% 的区间内。这些结果凸显了 RLGC 在训练集与测试集不匹配的图像修复方法中具备可靠的泛化能力。这对于实际应用至关重要,因为训练数据集中总是存在未包含的其他插值方法。

Time Cost  时间成本

RLGC’s training takes around 25 hours when conducted on a single NVIDIA L40 GPU. And the average time to attack one image is 3.37 seconds. These results demonstrate RLGC’s efficient and practical characteristic.
RLGC 的训练在单个 NVIDIA L40 GPU 上进行时大约需要 25 小时。攻击单张图像的平均时间为 3.37 秒。这些结果充分展示了 RLGC 的高效性和实用性。

Conclusions and Future Work
结论与未来工作

In this paper, we present a query-based anti-forensics framework for attacking black-box inpainting forensics methods, using RL-based techniques. It achieves both high attack performance and negligible image distortion based on queryefficient attack. Experiments demonstrate that RLGC is effective in transferring across different inpainting methods and detectors, even when experimental settings for training and testing differ. In the future, we aim to address several issues in the future. First, we will expand our anti-forensics scenarios to include more image forgery operations. Second, we aim to leverage the power of RL to automatically generate forgery images, thus addressing the pressing need for more well-crafted forgery datasets.
本文提出了一种基于查询的反取证框架,用于攻击黑盒图像修复取证方法,采用强化学习(RL)技术。该框架在查询高效攻击下,同时实现了高攻击性能和微小的图像失真。实验结果表明,RLGC 能够有效地跨不同图像修复方法和检测器进行迁移,即使训练和测试的实验设置不同。未来,我们将致力于解决以下几个问题。首先,我们将扩展反取证场景,涵盖更多图像伪造操作。其次,我们计划利用 RL 的优势自动生成伪造图像,从而解决当前亟需更多高质量伪造数据集的问题。

Acknowledgments  致谢

This work is supported by National Natural Science Foundation of China (Grant 62272314, U23B2022) and Guangdong Provincial Key Laboratory (Grant 2023B1212060076).
本研究得到国家自然科学基金(项目编号:62272314,U23B2022)和广东省重点实验室(项目编号:2023B1212060076)的资助。

References  参考文献

Akhtar, N.; and Mian, A. 2018. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 6: 14410-14430.
阿克塔尔,N.;米安,A. 2018. 深度学习在计算机视觉中面临的对抗性攻击威胁:综述. 《IEEE 访问》,6: 14410-14430.

Andriushchenko, M.; Croce, F.; Flammarion, N.; and Hein, M. 2020. Square attack: a query-efficient black-box adversarial attack via random search. In European conference on computer vision, 484-501. Springer.
安德留申科,M.;克罗切,F.;弗拉马里翁,N.;和海因,M. 2020. 方块攻击:一种基于随机搜索的查询高效黑盒对抗攻击. 计算机视觉欧洲会议论文集, 484-501. 施普林格.

Barni, M.; Kallas, K.; Nowroozi, E.; and Tondi, B. 2019. On the transferability of adversarial examples against CNNbased image forensics. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 82868290.
巴尼,M.;卡拉斯,K.;诺鲁齐,E.;和托恩迪,B. 2019. 关于对抗样本对基于卷积神经网络的图像取证的可迁移性研究. 发表于 IEEE 国际声学、语音与信号处理会议(ICASSP),82868290.
Bertalmio, M.; Bertozzi, A. L.; and Sapiro, G. 2001. Navierstokes, fluid dynamics, and image and video inpainting. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), volume 1, 355-362.
伯特尔米奥,M.;贝托齐,A. L.;和萨皮罗,G. 2001. 纳维尔-斯托克斯方程、流体动力学与图像及视频修复. 收录于《IEEE 计算机学会计算机视觉与模式识别会议(CVPR)论文集》,第 1 卷,第 355-362 页.

Carlini, N.; and Farid, H. 2020. Evading deepfake-image detectors with white-and black-box attacks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops(CVPRW), 658-659.
卡尔利尼,N.;法里德,H. 2020. 通过白盒和黑盒攻击规避深度伪造图像检测器. 收录于《IEEE/CVF 计算机视觉与模式识别研讨会论文集》(CVPRW),第 658-659 页.

Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; and FeiFei, L. 2009. ImageNet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition CVPR, 248-255.
邓, J.; 董, W.; 索切尔, R.; 李, L.-J.; 李, K.; 和 费菲, L. 2009. ImageNet: 一个大规模分层图像数据库. 2009 年 IEEE 计算机视觉与模式识别会议 CVPR, 248-255.

Ding, F.; Shen, Z.; Zhu, G.; Kwong, S.; Zhou, Y.; and Lyu, S. 2022. ExS-GAN: Synthesizing anti-forensics images via extra supervised GAN. IEEE Transactions on Cybernetics, 53(11): 7162-7173.
丁, F.; 沈, Z.; 朱, G.; 鄺, S.; 周, Y.; 和 吕, S. 2022. ExS-GAN: 通过额外监督的生成对抗网络合成反取证图像. 电气与电子工程师学会网络控制与自动化系统汇刊, 53(11): 7162-7173.

Fan, B.; Hu, S.; and Ding, F. 2024. Synthesizing black-box anti-forensics deepfakes with high visual quality. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 4545-4549. IEEE.
范, B.; 胡, S.; 和 丁, F. 2024. 基于黑盒反取证技术的高清深度伪造合成. 2024 年国际声学、语音与信号处理会议(ICASSP 2024-2024)论文集, 4545-4549. 电气与电子工程师协会(IEEE).

Gloe, T.; and Böhme, R. 2010. The’Dresden Image Database’ for benchmarking digital image forensics. In Proceedings of the ACM Symposium on Applied Computing, 1584-1590.
格洛伊,T.;和博姆,R. 2010. 《德累斯顿图像数据库》用于数字图像取证的基准测试. 收录于《ACM 应用计算研讨会论文集》,第 1584-1590 页.

Goodfellow, I. J.; Shlens, J.; and Szegedy, C. 2015. Explaining and Harnessing Adversarial Examples. In 3rd International Conference on Learning Representations(ICLR).
古德费洛, I. J.; 什伦斯, J.; 和 塞格迪, C. 2015. 解释与利用对抗样本. 收录于第 3 届国际学习表示会议(ICLR).

Guo, Q.; Gao, S.; Zhang, X.; Yin, Y.; and Zhang, C. 2017. Patch-based image inpainting via two-stage low rank approximation. IEEE transactions on Visualization and Computer Graphics, 24(6): 2023-2036.
郭, Q.; 高, S.; 张, X.; 尹, Y.; 和 张, C. 2017. 基于补丁的图像修复方法:两阶段低秩逼近. 电气与电子工程师学会可视化与计算机图形学汇刊, 24(6): 2023-2036.

Herling, J.; and Broll, W. 2014. High-quality real-time video inpainting with PixMix. IEEE Transactions on Visualization and Computer Graphics, 20(6): 866-879.
赫林,J.;布罗尔,W. 2014. 基于 PixMix 的高质量实时视频修复. 视觉与计算机图形学汇刊, 20(6): 866-879.

Huang, J.-B.; Kang, S. B.; Ahuja, N.; and Kopf, J. 2014. Image completion using planar structure guidance. A C M A C M ACMA C M Transactions on Graphics (TOG), 33(4): 1-10.
黄, J.-B.; 康, S. B.; 阿胡贾, N.; 和 科普夫, J. 2014. 基于平面结构引导的图像补全. A C M A C M ACMA C M 图形学交易 (TOG), 33(4): 1-10.
Karras, T.; Aila, T.; Laine, S.; and Lehtinen, J. 2018. Progressive Growing of GANs for Improved Quality, Stability, and Variation. In Proceedings of the International Conference on Learning Representations (ICLR).
卡拉斯,T.;艾拉,T.;莱内,S.;和莱赫蒂宁,J. 2018. 生成对抗网络的渐进式生长以提升质量、稳定性和多样性. 收录于《国际学习表示会议(ICLR)论文集》.

Kurakin, A.; Goodfellow, I. J.; and Bengio, S. 2017. Adversarial examples in the physical world. In Proceedings of the International Conference on Learning Representations(ICLR).
库拉金,A.;古德费洛,I. J.;和本吉奥,S. 2017. 物理世界中的对抗性示例. 收录于《国际学习表示会议论文集》(ICLR).

Li, H.; and Huang, J. 2019. Localization of Deep Inpainting Using High-pass Fully Convolutional Network. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 8301-8310.
李, H.; 和 黄, J. 2019. 基于高通全卷积网络的深度修复定位. 发表于 IEEE/CVF 国际计算机视觉会议(ICCV)论文集, 8301-8310.

Li, H.; Shan, S.; Wenger, E.; Zhang, J.; Zheng, H.; and Zhao, B. Y. 2022. Blacklight: Scalable defense for neural networks against {Query-Based}{Black-Box} attacks. In 31st USENIX Security Symposium (USENIX Security 22), 21172134.
李, H.; 山, S.; 韦恩格, E.; 张, J.; 郑, H.; 和 赵, B. Y. 2022. Blacklight: 针对基于查询的黑盒攻击的可扩展神经网络防御方案. 收录于第 31 届 USENIX 安全研讨会(USENIX Security 22),21172134.
Li, N.; and Chen, Z. 2021. Toward Visual Distortion in Black-Box Attacks. IEEE Transactions on Image Processing, 30: 6156-6167.
李, N.; 和 陈, Z. 2021. 面向黑盒攻击的视觉失真研究. 电气与电子工程师学会图像处理汇刊, 30: 6156-6167.

Liu, G.; Reda, F. A.; Shih, K. J.; Wang, T.-C.; Tao, A.; and Catanzaro, B. 2018. Image inpainting for irregular holes using partial convolutions. In Proceedings of the European Conference on Computer Vision (ECCV), 85-100.
刘, G.; 雷达, F. A.; 史, K. J.; 王, T.-C.; 陶, A.; 和 卡坦扎罗, B. 2018. 基于部分卷积的不规则孔洞图像修复. 计算机视觉欧洲会议(ECCV)论文集, 85-100.

Maho, T.; Furon, T.; and Le Merrer, E. 2021. Surfree: a fast surrogate-free black-box attack. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 10430-10439.
马霍, T.; 弗龙, T.; 和 勒梅尔, E. 2021. Surfree: 一种快速无代理黑盒攻击方法. 发表于 IEEE/CVF 计算机视觉与模式识别会议论文集 (CVPR), 10430-10439.

Mayer, O.; and Stamm, M. C. 2018. Accurate and Efficient Image Forgery Detection Using Lateral Chromatic Aberration. IEEE Transactions on Information Forensics and Security, 13: 1762-1777.
迈尔,O.;斯塔姆,M. C. 2018. 基于侧向色差的高精度与高效图像伪造检测. 信息保障与安全汇刊,13: 1762-1777.

Mnih, V.; Badia, A.; Adria, P.; Mirza, M.; Graves, A.; Lillicrap, T.; Harley, T.; Silver, D.; and Kavukcuoglu, K. 2016. Asynchronous methods for deep reinforcement learning. In Proceedings of the International Conference on Machine Learning(ICML), 1928-1937.
米尼赫,V.;巴迪亚,A.;阿德里亚,P.;米尔扎,M.;格雷夫斯,A.;利利克拉普,T.;哈雷,T.;西尔弗,D.;和卡武库库卢,K. 2016. 深度强化学习的异步方法. 机器学习国际会议(ICML)论文集,1928-1937.

Nazeri, K.; Ng, E.; Joseph, T.; Qureshi, F.; and Ebrahimi, M. 2019. EdgeConnect: Structure Guided Image Inpainting using Edge Prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops.
纳泽里,K.;吴,E.;约瑟夫,T.;库雷希,F.;和埃布拉希米,M. 2019. EdgeConnect:基于边缘预测的结构引导图像修复. 发表于 IEEE/CVF 国际计算机视觉会议(ICCV)研讨会论文集.

Ronneberger, O.; Fischer, P.; and Brox, T. 2015. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Medical Image Computing and Computer-Assisted Intervention, 234-241.
罗内伯格,O.;费舍尔,P.;布罗克斯,T. 2015. U-Net:用于生物医学图像分割的卷积神经网络. 医学图像计算与计算机辅助干预,234-241.

Tan, M.; and Le, Q. 2019. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the International Conference on Machine Learning (ICML), volume 97, 6105-6114.
谭, M.; 和 勒, Q. 2019. EfficientNet: 卷积神经网络模型规模优化的新思路. 收录于《国际机器学习会议论文集》(ICML),第 97 卷,第 6105-6114 页.

Telea, A. 2004. An Image Inpainting Technique Based on the Fast Marching Method. Journal of Graphics Tools, 9(1): 23-34.
特莱亚,A. 2004. 基于快速行进方法的图像修复技术. 图形工具期刊, 9(1): 23-34.

Verdoliva, L. 2020. Media forensics and deepfakes: An overview. IEEE Journal of Selected Topics in Signal Processing, 14(5): 910-932.
韦尔多利瓦,L. 2020. 媒体取证与深度伪造:综述. 《IEEE 信号处理精选专题期刊》,14(5): 910-932.
Wu, H.; and Zhou, J. 2022. IID-Net: Image Inpainting Detection Network via Neural Architecture Search and Attention. IEEE Transactions on Circuits and Systems for Video Technology, 32(3): 1172-1185.
吴, H.; 和 周, J. 2022. IID-Net: 基于神经网络架构搜索和注意机制的图像修复检测网络. 《IEEE 电路与系统视频技术汇刊》, 32(3): 1172-1185.

Wu, H.; Zhou, J.; and Li, Y. 2021. Deep generative model for image inpainting with local binary pattern learning and spatial attention. IEEE Transactions on Multimedia, 24: 40164027.
吴, H.; 周, J.; 和 李, Y. 2021. 基于局部二值模式学习与空间注意的图像修复深度生成模型. 电气与电子工程师协会多媒体汇刊, 24: 40164027.
Xie, H.; Ni, J.; and Shi, Y.-Q. 2021. Dual-domain generative adversarial network for digital image operation antiforensics. IEEE Transactions on Circuits and Systems for Video Technology, 32(3): 1701-1706.
谢, H.; 倪, J.; 和 史, Y.-Q. 2021. 双域生成对抗网络在数字图像操作反取证中的应用. 《IEEE 电路与系统视频技术汇刊》, 32(3): 1701-1706.

Yan, Z.; Li, X.; Li, M.; Zuo, W.; and Shan, S. 2018. Shiftnet: Image inpainting via deep feature rearrangement. In Proceedings of the European Conference on Computer Vision (ECCV), 1-17.
严, Z.; 李, X.; 李, M.; 左, W.; 和 山, S. 2018. Shiftnet: 基于深度特征重排的图像修复. 收录于《欧洲计算机视觉会议论文集》(ECCV),第 1-17 页.

Yang, W.; Cai, R.; and Kot, A. 2022. Image Inpainting Detection via Enriched Attentive Pattern with Near Original Image Augmentation. In Proceedings of the 30th ACM International Conference on Multimedia(ACM MM), 2816-2824.
杨, W.; 蔡, R.; 和 Kot, A. 2022. 基于增强注意力模式与近原图增强的图像修复检测. 收录于第 30 届 ACM 国际多媒体会议(ACM MM)论文集, 2816-2824.

Yu, J.; Lin, Z.; Yang, J.; Shen, X.; Lu, X.; and Huang, T. S. 2018. Generative image inpainting with contextual attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 5505-5514.
于, J.; 林, Z.; 杨, J.; 沈, X.; 卢, X.; 和 黄, T. S. 2018. 基于上下文注意的生成式图像修复. 2018 年 IEEE 计算机视觉与模式识别会议论文集 (CVPR), 5505-5514.

Yu, J.; Lin, Z.; Yang, J.; Shen, X.; Lu, X.; and Huang, T. S. 2019. Free-form image inpainting with gated convolution. In Proceedings of the IEEE/CVF international Conference on Computer Vision (CVPR), 4471-4480.
于, J.; 林, Z.; 杨, J.; 沈, X.; 卢, X.; 和 黄, T. S. 2019. 基于门控卷积的自由形式图像修复. 2019 年 IEEE/CVF 国际计算机视觉会议论文集, 4471-4480.

Yu, T.; Guo, Z.; Jin, X.; Wu, S.; Chen, Z.; Li, W.; Zhang, Z.; and Liu, S. 2020. Region normalization for image inpainting. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), volume 34, 12733-12740.
于, T.; 郭, Z.; 金, X.; 吴, S.; 陈, Z.; 李, W.; 张, Z.; 和 刘, S. 2020. 基于区域归一化的图像修复. 人工智能协会年会论文集 (AAAI), 第 34 卷, 12733-12740.

Zhang, Y.; Fu, Z.; Qi, S.; Xue, M.; Cao, X.; and Xiang, Y. 2023. PS-Net: A Learning Strategy for Accurately Exposing the Professional Photoshop Inpainting. IEEE Transactions on Neural Networks and Learning Systems, 1-13.
张, Y.; 傅, Z.; 闫, S.; 薛, M.; 曹, X.; 和 向, Y. 2023. PS-Net: 一种准确揭示专业 Photoshop 修复的机器学习策略. 电气与电子工程师协会神经网络与学习系统汇刊, 1-13.

Zhou, B.; Lapedriza, A.; Khosla, A.; Oliva, A.; and Torralba, A. 2017. Places: A 10 million image database for scene recognition. IEEE transactions on Pattern Analysis and Machine Intelligence, 40(6): 1452-1464.
周, B.; 拉佩德里扎, A.; 科斯拉, A.; 奥利瓦, A.; 和 托拉尔巴, A. 2017. 地点: 一个用于场景识别的 1000 万张图像数据库. 模式分析与机器智能汇刊, 40(6): 1452-1464.

  1. *Corresponding author.  *通讯作者。
    Copyright © 2025, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.
    版权 © 2025,人工智能促进协会(www.aaai.org)。保留所有权利。