Automated software debugging is a crucial task for improving the productivity of software developers. Many neural-based techniques have been proven effective for debugging-related tasks such as bug localization and program repair (or bug fixing). However, these techniques often focus only on either one of them or approach them in a stage-wise manner, ignoring the mutual benefits between them. In this work, we propose a novel unified \emph{Detect-Localize-Repair} framework based on a pretrained programming language model CodeT5 to seamlessly address these tasks, named CodeT5-DLR. Specifically, we propose three objectives to adapt the generic CodeT5 for debugging: a bug detection objective to determine whether a given code snippet is buggy or not, a bug localization objective to identify the buggy lines, and a program repair objective to translate the buggy code to its fixed version. We evaluate it on each of these tasks and their combined setting on two newly collected line-level debugging datasets in Java and Python. Extensive results show that our model significantly outperforms existing baselines from both NLP and software engineering domains.
translated by 谷歌翻译
图形神经网络已被证明可以为各种软件工程任务产生令人印象深刻的结果。但是,现有技术仍然有两个问题:(1)长期依赖性和(2)不同的代码组件在不应该的情况下被视为平等。为了解决这些问题,我们提出了一种表示代码为层次结构(代码层次结构)的方法,其中不同的代码组件在各个粒度级别分别表示。然后,为了处理每个表示级别的表示,我们设计了一个新颖的网络体系结构Echelon,它结合了异质图形变压器网络和基于树的卷积神经网络的优势,以学习具有代码依赖性信息丰富的抽象语法树。我们还提出了一个新颖的预处理目标,称为缺失子树预测以补充我们的代码层次结构。评估结果表明,我们的方法在三个任务中大大优于其他基准:任何代码完成,代码分类和代码克隆检测。
translated by 谷歌翻译
在编程中,学习代码表示有各种应用程序,包括代码分类,代码搜索,注释生成,错误预测等。已经提出了在令牌,语法树,依赖图,代码导航路径或其变体组合方面的各种代码表示,但是,现有的vanilla学习技术具有鲁棒性的主要限制,即,型号很容易当输入以微妙的方式改变输入时,要进行错误的预测。为了增强稳健性,现有方法专注于识别对抗性样本,而不是在落在给定分布之外的有效样品上,我们将其称为分配(OOD)样本。识别出这样的ood样本是本文研究的新问题。为此,我们建议首先使用分发的样本进行in =分发数据集,使得当培训在一起时,它们将增强模型的鲁棒性。我们建议使用能量有界学习的目标函数来将更高的分数分配给分布式样本和较低的分数,以便将这种分布式样品纳入源的培训过程中代码模型。在检测和逆势样本检测方面,我们的评估结果表明,现有源代码模型的稳健性更加准确,在识别ood数据时,同时在同时对对抗性攻击更具抵抗力。此外,所提出的能量有限评分优于大幅的余量,包括Softmax置信度评分,Mahalanobis评分和Odin。
translated by 谷歌翻译
In this paper, we propose a novel technique, namely INVALIDATOR, to automatically assess the correctness of APR-generated patches via semantic and syntactic reasoning. INVALIDATOR reasons about program semantic via program invariants while it also captures program syntax via language semantic learned from large code corpus using the pre-trained language model. Given a buggy program and the developer-patched program, INVALIDATOR infers likely invariants on both programs. Then, INVALIDATOR determines that a APR-generated patch overfits if: (1) it violates correct specifications or (2) maintains errors behaviors of the original buggy program. In case our approach fails to determine an overfitting patch based on invariants, INVALIDATOR utilizes a trained model from labeled patches to assess patch correctness based on program syntax. The benefit of INVALIDATOR is three-fold. First, INVALIDATOR is able to leverage both semantic and syntactic reasoning to enhance its discriminant capability. Second, INVALIDATOR does not require new test cases to be generated but instead only relies on the current test suite and uses invariant inference to generalize the behaviors of a program. Third, INVALIDATOR is fully automated. We have conducted our experiments on a dataset of 885 patches generated on real-world programs in Defects4J. Experiment results show that INVALIDATOR correctly classified 79% overfitting patches, accounting for 23% more overfitting patches being detected by the best baseline. INVALIDATOR also substantially outperforms the best baselines by 14% and 19% in terms of Accuracy and F-Measure, respectively.
translated by 谷歌翻译
ICECUBE是一种用于检测1 GEV和1 PEV之间大气和天体中微子的光学传感器的立方公斤阵列,该阵列已部署1.45 km至2.45 km的南极的冰盖表面以下1.45 km至2.45 km。来自ICE探测器的事件的分类和重建在ICeCube数据分析中起着核心作用。重建和分类事件是一个挑战,这是由于探测器的几何形状,不均匀的散射和冰中光的吸收,并且低于100 GEV的光,每个事件产生的信号光子数量相对较少。为了应对这一挑战,可以将ICECUBE事件表示为点云图形,并将图形神经网络(GNN)作为分类和重建方法。 GNN能够将中微子事件与宇宙射线背景区分开,对不同的中微子事件类型进行分类,并重建沉积的能量,方向和相互作用顶点。基于仿真,我们提供了1-100 GEV能量范围的比较与当前ICECUBE分析中使用的当前最新最大似然技术,包括已知系统不确定性的影响。对于中微子事件分类,与当前的IceCube方法相比,GNN以固定的假阳性速率(FPR)提高了信号效率的18%。另外,GNN在固定信号效率下将FPR的降低超过8(低于半百分比)。对于能源,方向和相互作用顶点的重建,与当前最大似然技术相比,分辨率平均提高了13%-20%。当在GPU上运行时,GNN能够以几乎是2.7 kHz的中位数ICECUBE触发速率的速率处理ICECUBE事件,这打开了在在线搜索瞬态事件中使用低能量中微子的可能性。
translated by 谷歌翻译
无人驾驶汽车(UAV)在许多领域都受雇于摄影,紧急,娱乐,国防,农业,林业,采矿和建筑。在过去的十年中,无人机技术在许多施工项目阶段中找到了应用程序,从现场映射,进度监控,建筑物检查,损坏评估和材料交付等等。尽管已经对无人机在各种施工相关的过程中的优势进行了广泛的研究,但关于提高任务能力和效率的无人机协作的研究仍然很少。本文提出了一种基于塔格狩猎游戏和粒子群优化(PSO)的多个无人机的新合作路径计划算法。首先,定义了每个无人机的成本函数,并包含多个目标和约束。然后,开发了无人机游戏框架,以将多功能路径计划制定到寻找回报优势均衡的问题。接下来,提出了基于PSO的算法来获得无人机的最佳路径。由三个无人机检查的大型建筑工地的仿真结果表明,在检查任务期间,提出的算法在为无人机形成的可行和高效飞行路径生成可行,高效的飞行路径上的有效性。
translated by 谷歌翻译
晶体和分子感兴趣的特性,例如带隙,弹性和溶解度,通常相互关联:它们受相同的基础物理定律的控制。但是,当最新的图形神经网络尝试同时预测多个属性(多任务学习(MTL)设置)时,它们经常表现不佳。这表明图形网络可能无法完全利用这些潜在的相似性。在这里,我们研究了这种现象的潜在解释:每个物业损失表面的曲率都有很大变化,导致学习效率低下。曲率上的这种差异可以通过查看每个属性损耗函数的Hessians的光谱特性来评估,这是通过随机数值线性代数以无基质方式完成的。我们在两个基准数据集(材料项目(MP)和QM8)上评估我们的假设,并考虑这些发现如何为新颖的多任务学习模型的培训提供信息。
translated by 谷歌翻译
机器学习最近被出现为研究复杂现象的有希望的方法,其特征是丰富的数据集。特别地,以数据为中心的方法为手动检查可能错过的实验数据集中自动发现结构的可能性。在这里,我们介绍可解释的无监督监督的混合机学习方法,混合相关卷积神经网络(Hybrid-CCNN),并将其应用于使用基于Rydberg Atom阵列的可编程量子模拟器产生的实验数据。具体地,我们应用Hybrid-CCNN以通过可编程相互作用分析在方形格子上的新量子阶段。初始无监督的维度降低和聚类阶段首先揭示了五个不同的量子相位区域。在第二个监督阶段,我们通过培训完全解释的CCNN来细化这些相界并通过训练每个阶段提取相关的相关性。在条纹相中的每个相捕获量子波动中专门识别的特征空间加权和相关的相关性并鉴定两个先前未检测到的相,菱形和边界有序相位。这些观察结果表明,具有机器学习的可编程量子模拟器的组合可用作有关相关量子态的详细探索的强大工具。
translated by 谷歌翻译
分解表示形式通常被用于年龄不变的面部识别(AIFR)任务。但是,这些方法已经达到了一些局限性,(1)具有年龄标签的大规模面部识别(FR)培训数据的要求,这在实践中受到限制; (2)高性能的重型深网架构; (3)他们的评估通常是在与年龄相关的面部数据库上进行的,同时忽略了标准的大规模FR数据库以确保鲁棒性。这项工作提出了一种新颖的轻巧的角度蒸馏(LIAAD)方法,用于克服这些限制的大规模轻量级AIFR。鉴于两个具有不同专业知识的教师,LIAAD引入了学习范式,以有效地提炼老年人的专注和棱角分明的知识,从这些老师到轻量级的学生网络,使其更强大,以更高的fr准确性和稳健的年龄,从而有效地提炼了一个学习范式因素。因此,LIAAD方法能够采用带有和不具有年龄标签的两个FR数据集的优势来训练AIFR模型。除了先前的蒸馏方法主要关注封闭设置问题中的准确性和压缩比,我们的LIAAD旨在解决开放式问题,即大规模的面部识别。对LFW,IJB-B和IJB-C Janus,AgeDB和Megaface-Fgnet的评估证明了拟议方法在轻重量结构上的效率。这项工作还提出了一个新的纵向面部衰老(Logiface)数据库\ footNote {将提供该数据库},以进一步研究未来与年龄相关的面部问题。
translated by 谷歌翻译
When robots learn reward functions using high capacity models that take raw state directly as input, they need to both learn a representation for what matters in the task -- the task ``features" -- as well as how to combine these features into a single objective. If they try to do both at once from input designed to teach the full reward function, it is easy to end up with a representation that contains spurious correlations in the data, which fails to generalize to new settings. Instead, our ultimate goal is to enable robots to identify and isolate the causal features that people actually care about and use when they represent states and behavior. Our idea is that we can tune into this representation by asking users what behaviors they consider similar: behaviors will be similar if the features that matter are similar, even if low-level behavior is different; conversely, behaviors will be different if even one of the features that matter differs. This, in turn, is what enables the robot to disambiguate between what needs to go into the representation versus what is spurious, as well as what aspects of behavior can be compressed together versus not. The notion of learning representations based on similarity has a nice parallel in contrastive learning, a self-supervised representation learning technique that maps visually similar data points to similar embeddings, where similarity is defined by a designer through data augmentation heuristics. By contrast, in order to learn the representations that people use, so we can learn their preferences and objectives, we use their definition of similarity. In simulation as well as in a user study, we show that learning through such similarity queries leads to representations that, while far from perfect, are indeed more generalizable than self-supervised and task-input alternatives.
translated by 谷歌翻译