perturb-and-MAP
时间: 2023-10-08 14:09:48 浏览: 43
Perturb-and-MAP是一种基于最大后验概率(MAP)的图像处理技术,它通过对图像进行微小的扰动(perturbation)来增加其鲁棒性和可靠性。这种技术通常用于图像分类和目标检测等任务中,通过对图像进行随机扰动来生成多个版本的图像,然后将这些版本的图像输入到模型中进行训练或推理,从而提高模型的泛化能力和鲁棒性。这种技术的原理是,通过对图像进行随机扰动,可以使模型学习到更多的数据分布,从而提高其对不同场景和环境的适应能力。
相关问题
STM32基于Perturb and Observe的MPPT程序
抱歉,我是AI语言模型,无法提供代码编写服务。但是,以下是Perturb and Observe(P&O)算法的STM32代码示例,供您参考:
```
#include "stm32f4xx.h"
#define V_REF 3.3 // 参考电压
#define V_MPPT 0.5 // MPPT电压
#define DELTA_V 0.01 // 电压变化量
#define DELTA_DUTY 1 // 占空比变化量
#define KP 0.008 // 比例系数
int main(void)
{
float vpv, pv_voltage;
float duty = 0.0;
float delta_power, delta_duty;
float power, prev_power = 0.0;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
GPIO_InitTypeDef gpio;
gpio.GPIO_Pin = GPIO_Pin_0;
gpio.GPIO_Mode = GPIO_Mode_AN;
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &gpio);
TIM_TimeBaseInitTypeDef tim;
tim.TIM_Prescaler = 84 - 1;
tim.TIM_Period = 1000;
tim.TIM_ClockDivision = TIM_CKD_DIV1;
tim.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseInit(TIM2, &tim);
TIM_OCInitTypeDef tim_oc;
tim_oc.TIM_OCMode = TIM_OCMode_PWM1;
tim_oc.TIM_OutputState = TIM_OutputState_Enable;
tim_oc.TIM_Pulse = duty;
tim_oc.TIM_OCPolarity = TIM_OCPolarity_High;
TIM_OC1Init(TIM2, &tim_oc);
TIM_OC1PreloadConfig(TIM2, TIM_OCPreload_Enable);
while(1)
{
vpv = ADC_GetConversionValue(ADC1);
pv_voltage = V_REF * vpv / 4095;
power = pv_voltage * duty;
delta_power = power - prev_power;
if(delta_power > 0)
{
delta_duty = KP * delta_power / (pv_voltage * pv_voltage);
duty -= delta_duty;
}
else
{
duty += DELTA_DUTY;
}
if(duty < 0)
{
duty = 0;
}
else if(duty > 1000)
{
duty = 1000;
}
TIM_SetCompare1(TIM2, duty);
prev_power = power;
}
}
```
此代码使用STM32F4系列微控制器,使用ADC1读取PV板电压,使用TIM2控制占空比。算法使用Perturb and Observe(P&O)算法,根据当前功率变化调整占空比。需要根据实际电路和外设进行调整和优化。
这一段讲的是什么:Abstract—A recent trojan attack on deep neural network (DNN) models is one insidious variant of data poisoning attacks. Trojan attacks exploit an effective backdoor created in a DNN model by leveraging the difficulty in interpretability of the learned model to misclassify any inputs signed with the attacker’s chosen trojan trigger. Since the trojan trigger is a secret guarded and exploited by the attacker, detecting such trojan inputs is a challenge, especially at run-time when models are in active operation. This work builds STRong Intentional Perturbation (STRIP) based run-time trojan attack detection system and focuses on vision system. We intentionally perturb the incoming input, for instance by superimposing various image patterns, and observe the randomness of predicted classes for perturbed inputs from a given deployed model—malicious or benign. A low entropy in predicted classes violates the input-dependence property of a benign model and implies the presence of a malicious input—a characteristic of a trojaned input. The high efficacy of our method is validated through case studies on three popular and contrasting datasets: MNIST, CIFAR10 and GTSRB. We achieve an overall false acceptance rate (FAR) of less than 1%, given a preset false rejection rate (FRR) of 1%, for different types of triggers. Using CIFAR10 and GTSRB, we have empirically achieved result of 0% for both FRR and FAR. We have also evaluated STRIP robustness against a number of trojan attack variants and adaptive attacks. Index Terms—Trojan attack, Backdoor attack
这段摘要讲述了关于深度神经网络(DNN)模型的特洛伊木马攻击。特洛伊攻击是一种数据污染攻击的变种,通过利用学习模型的难以解释性,在DNN模型中创建一个有效的后门,以便将任何使用攻击者选择的特洛伊触发器进行签名的输入进行错误分类。由于特洛伊触发器是攻击者保护和利用的秘密,因此在模型处于活动运行状态时,检测此类特洛伊输入是一项挑战。本文构建了基于STRong Intentional Perturbation(STRIP)的运行时特洛伊攻击检测系统,并专注于视觉系统。我们有意地扰乱传入的输入,例如通过叠加各种图像模式,并观察给定部署模型对扰动输入预测类别的随机性-恶意或良性。预测类别的低熵违反了良性模型的输入依赖性属性,并意味着存在恶意输入-这是特洛伊输入的特征。我们通过对三个流行且对比鲜明的数据集(MNIST、CIFAR10和GTSRB)进行案例研究,验证了我们方法的高效性。在给定1%的预设误拒绝率(FRR)的情况下,我们实现了总体误接受率(FAR)小于1%。使用CIFAR10和GTSRB,我们在FRR和FAR方面实现了0%的实证结果。我们还评估了STRIP对多种特洛伊攻击变种和自适应攻击的鲁棒性。
关键词:特洛伊攻击,后门攻击。
这段摘要主要描述了论文中的研究内容和方法,介绍了特洛伊攻击的背景和目标,并提到了作者使用的STRIP方法以及对多个数据集的案例研究和性能评估。
相关推荐
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)