可选类型的注释允许通过静态打字功能来丰富动态编程语言,例如更好的集成开发环境(IDE)支持,更精确的程序分析以及与类型相关的运行时错误的早期检测和预防。基于机器学习的类型推理有望自动执行此任务的有趣结果。但是,此类系统的实际用法取决于它们在跨不同领域概括的能力,因为它们通常在训练领域之外应用。在这项工作中,我们通过进行广泛的跨域实验来研究Type4py作为最先进的基于深度学习类型推理系统的代表性的概括能力。因此,我们解决了以下问题:数据集偏移,播音外词,未知类别和稀有类。为了执行此类实验,我们使用数据集nytypes4py和crossdomaintypes4py。我们在本文中介绍的后者。我们的数据集具有超过1,000,000个类型的注释,并可以使用来自两个域Web开发和科学计算的数据的数据的不同域中的类型推理系统进行跨域评估。通过我们的实验,我们检测到数据集中的变化,并具有长尾巴分布,并具有许多稀有和未知的数据类型,从而大大降低了基于深度学习的推理系统的性能。在这种情况下,我们测试了无监督的域适应方法和微调以克服问题。此外,我们研究了量量表的单词的影响。
translated by 谷歌翻译
GitHub是Internet上最大的开源软件主机。这个大型,可自由访问的数据库吸引了从业人员和研究人员的注意。但是,随着Github的增长的继续,越来越难以导航遍布广泛领域的大量存储库。过去的工作表明,考虑到应用程序域对于预测存储库的普及以及有关项目质量的推理的任务至关重要。在这项工作中,我们建立在先前注释的5,000个GitHub存储库的数据集上,以设计自动分类器,以通过其应用程序域对存储库进行分类。分类器使用最先进的自然语言处理技术和机器学习,根据五个应用程序域从多个数据源和目录存储库中学习。我们用(1)自动分类器贡献,该分类器可以将流行的存储库分配给每个应用程序域,至少具有70%的精度,(2)对该方法在不流行的存储库中的性能进行调查,以及(3)这种方法对这种方法的实际应用程序,用于回答软件工程实践的采用如何在应用程序域之间有何不同。我们的工作旨在帮助GitHub社区确定感兴趣的存储库,并为未来的工作开放有希望的途径,以调查来自不同应用领域的存储库之间的差异。
translated by 谷歌翻译
Machine Learning for Source Code (ML4Code) is an active research field in which extensive experimentation is needed to discover how to best use source code's richly structured information. With this in mind, we introduce JEMMA, an Extensible Java Dataset for ML4Code Applications, which is a large-scale, diverse, and high-quality dataset targeted at ML4Code. Our goal with JEMMA is to lower the barrier to entry in ML4Code by providing the building blocks to experiment with source code models and tasks. JEMMA comes with a considerable amount of pre-processed information such as metadata, representations (e.g., code tokens, ASTs, graphs), and several properties (e.g., metrics, static analysis results) for 50,000 Java projects from the 50KC dataset, with over 1.2 million classes and over 8 million methods. JEMMA is also extensible allowing users to add new properties and representations to the dataset, and evaluate tasks on them. Thus, JEMMA becomes a workbench that researchers can use to experiment with novel representations and tasks operating on source code. To demonstrate the utility of the dataset, we also report results from two empirical studies on our data, ultimately showing that significant work lies ahead in the design of context-aware source code models that can reason over a broader network of source code entities in a software project, the very task that JEMMA is designed to help with.
translated by 谷歌翻译
Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code, by an automated tool. APR tools have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE combine text-to-text transformers with software-specific techniques are outperforming alternatives, these days. However, in most APR studies the train and test sets are chosen from the same set of projects. In reality, however, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that reported APR models with high effectiveness perform poorly when the characteristics of the new project or its bugs are different than the training set's(Domain Shift). In this study, we first define and measure the domain shift problem in automated program repair. Then, we then propose a domain adaptation framework that can adapt an APR model for a given target project. We conduct an empirical study with three domain adaptation methods FullFineTuning, TuningWithLightWeightAdapterLayers, and CurriculumLearning using two state-of-the-art domain adaptation tools (TFix and CodeXGLUE) and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%. Another contribution of this study is the proposal of a data synthesis method to address the lack of labelled data in APR. We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively.
translated by 谷歌翻译
软件工程(ML4SE)的机器学习是一个积极发展的研究领域,专注于帮助程序员工作的方法。为了在实践中应用开发的方法,他们需要实现合理的质量,以帮助而不是分散开发人员的注意力。尽管开发新方法来代码表示和数据收集可以提高模型的整体质量,但它没有考虑到我们可以从手头项目中获得的信息。在这项工作中,我们研究了如果我们针对特定项目,则如何提高模型的质量。我们开发一个框架来评估质量改进,模型可以在特定项目上的方法名称预测任务进行微调后获得。我们评估了三种不同复杂性的模型,并在三个设置中进行了比较它们的质量:在大型Java项目的大型数据集上进行培训,进一步对特定项目的数据进行了微调,并从头开始训练了此数据。我们表明,每项项目的微调可以极大地提高模型的质量,因为它们捕获了项目的领域和命名约定。我们开放用于数据收集的工具以及运行实验的代码:https://zenodo.org/record/6040745。
translated by 谷歌翻译
反向工程师受益于二进制中的标识符(例如函数名称)的存在,但通常将其删除以释放。训练机器学习模型自动预测功能名称是有希望的,但从根本上讲很难:与自然语言中的单词不同,大多数函数名称仅出现一次。在本文中,我们通过引入极端功能标签(XFL)来解决此问题,这是一种极端的多标签学习方法,可为二进制功能选择适当的标签。 XFL将函数名称分为代币,将每个功能视为具有自然语言标记文本的问题的信息标签。我们将二进制代码的语义与通过dexter进行标签,这是一种新颖的函数,将基于静态分析的特征与来自呼叫图的本地上下文和整个二进制的全局上下文相结合。我们证明,XFL/Dexter在Debian Project的10,047个二进制数据集上的功能标签上优于最新技术,获得了83.5%的精度。我们还研究了XFL与文献中的替代二进制嵌入的组合,并表明Dexter始终为这项任务做得最好。结果,我们证明了二进制函数标记可以通过多标签学习有效地措辞,并且二进制函数嵌入得益于包括明确的语义特征。
translated by 谷歌翻译
随着研究人员和从业人员将机器学习应用于越来越多的软件工程问题,他们使用的方法变得更加复杂。许多现代方法都以抽象语法树(AST)或其扩展形式使用内部代码结构:基于路径的表示,复杂的图将AST与其他边缘结合在一起。即使可以使用不同的解析器来从代码中提取AST的过程,但选择解析器对最终模型质量的影响仍然没有研究。此外,研究人员经常省略提取特定代码表示的确切细节。在这项工作中,我们在方法名称预测任务中评估了两个模型,即Code2Seq和Treelstm,由八个不同的解析器用于Java语言。为了将数据制备的过程与不同的解析器统一,我们开发了SuperParser,这是基于Pathminer的多语言解析器 - 不合Snostic库。 SuperParser促进了适用于培训和评估ML模型的数据集的端到端创建,这些模型与源代码中的结构信息合作。我们的结果表明,不同解析器建造的树木的结构和内容各不相同。然后,我们分析这种多样性如何影响模型的质量,并表明两种模型最不合适的解析器之间的质量差距非常重要。最后,我们讨论了解析器的其他功能,研究人员和从业人员在选择解析器时应考虑这些特征,以及对模型质量的影响。 SuperParser代码可在https://doi.org/10.5281/zenodo.6366591上公开获得。我们还发布了Java-Norm,即我们用于评估模型的数据集:https://doi.org/10.5281/zenodo.6366599。
translated by 谷歌翻译
The International Workshop on Reading Music Systems (WoRMS) is a workshop that tries to connect researchers who develop systems for reading music, such as in the field of Optical Music Recognition, with other researchers and practitioners that could benefit from such systems, like librarians or musicologists. The relevant topics of interest for the workshop include, but are not limited to: Music reading systems; Optical music recognition; Datasets and performance evaluation; Image processing on music scores; Writer identification; Authoring, editing, storing and presentation systems for music scores; Multi-modal systems; Novel input-methods for music to produce written music; Web-based Music Information Retrieval services; Applications and projects; Use-cases related to written music. These are the proceedings of the 3rd International Workshop on Reading Music Systems, held in Alicante on the 23rd of July 2021.
translated by 谷歌翻译
Deep learning (DL) models of code have recently reported great progress for vulnerability detection. In some cases, DL-based models have outperformed static analysis tools. Although many great models have been proposed, we do not yet have a good understanding of these models. This limits the further advancement of model robustness, debugging, and deployment for the vulnerability detection. In this paper, we surveyed and reproduced 9 state-of-the-art (SOTA) deep learning models on 2 widely used vulnerability detection datasets: Devign and MSR. We investigated 6 research questions in three areas, namely model capabilities, training data, and model interpretation. We experimentally demonstrated the variability between different runs of a model and the low agreement among different models' outputs. We investigated models trained for specific types of vulnerabilities compared to a model that is trained on all the vulnerabilities at once. We explored the types of programs DL may consider "hard" to handle. We investigated the relations of training data sizes and training data composition with model performance. Finally, we studied model interpretations and analyzed important features that the models used to make predictions. We believe that our findings can help better understand model results, provide guidance on preparing training data, and improve the robustness of the models. All of our datasets, code, and results are available at https://figshare.com/s/284abfba67dba448fdc2.
translated by 谷歌翻译
在过去几年中,自动化机器学习(AUTOML)工具的普及有所增加。机器学习(ML)从业人员使用自动工具来自动化和优化功能工程,模型培训和超参数优化的过程。最近的工作对从业人员使用汽车工具的经验进行了定性研究,并根据其性能和提供的功能比较了不同的汽车工具,但是现有的工作都没有研究在大规模实际项目中使用Automl工具的实践。因此,我们进行了一项实证研究,以了解ML从业者如何在其项目中使用汽车工具。为此,我们在GitHub上托管的大量开源项目存储库中研究了最常用的十大汽车工具及其各自的用法。我们研究的结果表明1)ML从业人员主要使用哪种汽车工具,以及2)使用这些汽车工具的存储库的特征。此外,我们确定了使用Automl工具的目的(例如,模型参数采样,搜索空间管理,模型评估/错误分析,数据/功能转换和数据标记)以及ML管道的阶段(例如功能工程)使用工具。最后,我们报告在同一源代码文件中使用Automl工具的频率。我们希望我们的结果可以帮助ML从业人员了解不同的汽车工具及其使用情况,以便他们可以为其目的选择正确的工具。此外,Automl工具开发人员可以从我们的发现中受益,以深入了解其工具的用法并改善其工具以更好地适合用户的用法和需求。
translated by 谷歌翻译
Recent advances in deep learning (dl) have led to the release of several dl software libraries such as pytorch, Caffe, and TensorFlow, in order to assist machine learning (ml) practitioners in developing and deploying state-of-the-art deep neural networks (DNN), but they are not able to properly cope with limitations in the dl libraries such as testing or data processing. In this paper, we present a qualitative and quantitative analysis of the most frequent dl libraries combination, the distribution of dl library dependencies across the ml workflow, and formulate a set of recommendations to (i) hardware builders for more optimized accelerators and (ii) library builder for more refined future releases. Our study is based on 1,484 open-source dl projects with 46,110 contributors selected based on their reputation. First, we found an increasing trend in the usage of deep learning libraries. Second, we highlight several usage patterns of deep learning libraries. In addition, we identify dependencies between dl libraries and the most frequent combination where we discover that pytorch and Scikit-learn and, Keras and TensorFlow are the most frequent combination in 18% and 14% of the projects. The developer uses two or three dl libraries in the same projects and tends to use different multiple dl libraries in both the same function and the same files. The developer shows patterns in using various deep-learning libraries and prefers simple functions with fewer arguments and straightforward goals. Finally, we present the implications of our findings for researchers, library maintainers, and hardware vendors.
translated by 谷歌翻译
源代码(MLONCODE)上的机器学习有望改变软件的交付方式。通过挖掘软件伪像之间的上下文和关系,mloncode通过代码自动生成,代码建议,代码自动标记和其他数据驱动的增强功能增强了软件开发人员的功能。对于许多任务中,代码的脚本级别表示足够,但是,在许多情况下,要考虑各种依赖关系和存储库结构的存储库级表示,例如,自动标记存储库具有主题或自动记录的存储库。代码等,用于计算存储库级表示的现有方法受(a)依赖代码的自然语言文档(例如,读书文件)(b)方法/脚本级表示的天真聚集,例如,通过串联或平均值。本文介绍了一个深度神经网络,该网络可直接从源代码中生成可公开可用的GitHub代码存储库的存储库嵌入。主题结合了一种注意机制,该机制将源代码,完整依赖关系图和脚本级别的文本信息投射到密集的存储库级表示中。为了计算存储库级别的表示,局部训练可以预测与存储库相关的主题,该主题是在公开可用的GitHub存储库数据集中,这些存储库与他们的地面真相主题标签一起爬行。我们的实验表明,局部计算的嵌入能够胜过多个基线,包括通过在存储库自动标记的任务下平均或串联来天真地结合方法级表示的基线。
translated by 谷歌翻译
深学习方法,已经在诸如图像分类和自然语言处理领域中的成功应用,最近被应用到源代码分析过,由于免费提供源代码(例如,从开源软件库)的巨大数额。在这项工作中,我们阐述在国家的最先进的方法来使用有关其句法结构信息的源代码表示,我们适应它代表源的变化(即,提交)。我们使用这种表示安全相关的分类提交。因为我们的方法是使用迁移学习(也就是我们训练的一个“借口任务”是可用的丰富的标签数据的网络,然后我们使用这样的网络提交分类的目标任务,为此,少标记实例可用)我们研究了前培训使用两种不同的借口任务与随机初始化模型的网络的影响。我们的研究结果表明,通过利用代码语法跑赢基于令牌的表示得到的结构信息表示。此外,具有非常大的数据集上的松散的相关任务借口训练前时所获得的性能度量($> 10 ^ 6个$样品)上的更小的数据集训练前当超过($> 10 ^ 4 $样品)但对于一个借口任务更密切相关的目标任务。
translated by 谷歌翻译
为了允许机器学习算法从原始数据中提取知识,必须首先清除,转换,并将这些数据置于适当的形式。这些通常很耗时的阶段被称为预处理。预处理阶段的一个重要步骤是特征选择,其目的通过减少数据集的特征量来更好地执行预测模型。在这些数据集中,不同事件的实例通常是不平衡的,这意味着某些正常事件被超出,而其他罕见事件非常有限。通常,这些罕见的事件具有特殊的兴趣,因为它们具有比正常事件更具辨别力。这项工作的目的是过滤提供给这些罕见实例的特征选择方法的实例,从而积极影响特征选择过程。在这项工作过程中,我们能够表明这种过滤对分类模型的性能以及异常值检测方法适用于该过滤。对于某些数据集,所产生的性能增加仅为百分点,但对于其他数据集,我们能够实现高达16%的性能的增加。这项工作应导致预测模型的改进以及在预处理阶段的过程中的特征选择更好的可解释性。本着公开科学的精神,提高了我们的研究领域的透明度,我们已经在公开的存储库中提供了我们的所有源代码和我们的实验结果。
translated by 谷歌翻译
随着计算系统的不断增长的加工能力和大规模数据集的可用性的增加,机器学习算法导致了许多不同区域的重大突破。此开发影响了计算机安全性,在基于学习的安全系统中产生了一系列工作,例如用于恶意软件检测,漏洞发现和二进制代码分析。尽管潜力巨大,但安全性的机器学习易于细微缺陷,以破坏其性能,并使基于学习的系统可能不适合安全任务和实际部署。在本文中,我们用临界眼睛看这个问题。首先,我们确定基于学习的安全系统的设计,实现和评估中的常见缺陷。我们在过去的10年内,从顶层安全会议中进行了一项研究,确认这些陷阱在目前的安全文献中普遍存在。在一个实证分析中,我们进一步展示了个体陷阱如何导致不切实际的表现和解释,阻碍了对手的安全问题的理解。作为补救措施,我们提出了可行的建议,以支持研究人员在可能的情况下避免或减轻陷阱。此外,我们在将机器学习应用于安全性并提供进一步研究方向时确定打开问题。
translated by 谷歌翻译
评论是源代码的重要组成部分,是文档的主要来源。这引起了人们对使用大量注释的兴趣训练或评估消耗或生产它们的工具,例如生成甲骨文,甚至是从注释中生成代码,或自动生成代码摘要。这项工作大部分对评论的结构和质量做出了强烈的假设,例如假设它们主要由适当的英语句子组成。但是,我们对这些用例的现有评论的实际质量知之甚少。评论通常包含在其他类型的文本中看不到的独特结构和元素,并且从中过滤或提取信息需要额外的谨慎。本文探讨了来自GitHub的840个最受欢迎的开源项目和Srilab数据集的8422个项目的Python评论的内容和质量,并且Na \“ Ive vs.深入过滤的影响都可以使用现有注释来用于使用现有注释。培训和评估产生评论的系统。
translated by 谷歌翻译
在本文中,我们解决了深入学习的软件漏洞自动修复问题。数据驱动漏洞修复的主要问题是已知确认漏洞的少数现有数据集仅由几千例组成。然而,培训深度学习模型通常需要数十万例的例子。在这项工作中,我们利用了错误修复任务和漏洞修复任务的直觉相关,并且可以传输来自错误修复的知识可以传输到修复漏洞。在机器学习界中,这种技术称为转移学习。在本文中,我们提出了一种修复名为Vreepair的安全漏洞的方法,该方法是基于转移学习。 vreepair首先在大型错误修复语料库上培训,然后在漏洞修复数据集上调整,这是一个较小的数量级。在我们的实验中,我们表明,仅在错误修复语料库上培训的模型可能已经修复了一些漏洞。然后,我们证明转移学习改善了修复易受攻击的C功能的能力。我们还表明,转移学习模型比具有去噪任务训练的模型更好,并在漏洞固定任务上进行微调。总而言之,本文表明,与在小型数据集上的学习相比,转移学习适用于修复C中的安全漏洞。
translated by 谷歌翻译
In the last decade, several studies have explored automated techniques to estimate the effort of agile software development. We perform a close replication and extension of a seminal work proposing the use of Deep Learning for Agile Effort Estimation (namely Deep-SE), which has set the state-of-the-art since. Specifically, we replicate three of the original research questions aiming at investigating the effectiveness of Deep-SE for both within-project and cross-project effort estimation. We benchmark Deep-SE against three baselines (i.e., Random, Mean and Median effort estimators) and a previously proposed method to estimate agile software project development effort (dubbed TF/IDF-SVM), as done in the original study. To this end, we use the data from the original study and an additional dataset of 31,960 issues mined from TAWOS, as using more data allows us to strengthen the confidence in the results, and to further mitigate external validity threats. The results of our replication show that Deep-SE outperforms the Median baseline estimator and TF/IDF-SVM in only very few cases with statistical significance (8/42 and 9/32 cases, respectively), thus confounding previous findings on the efficacy of Deep-SE. The two additional RQs revealed that neither augmenting the training set nor pre-training Deep-SE play lead to an improvement of its accuracy and convergence speed. These results suggest that using semantic similarity is not enough to differentiate user stories with respect to their story points; thus, future work has yet to explore and find new techniques and features that obtain accurate agile software development estimates.
translated by 谷歌翻译
如今,由于最近在人工智能(AI)和机器学习(ML)中的近期突破,因此,智能系统和服务越来越受欢迎。然而,机器学习不仅满足软件工程,不仅具有有希望的潜力,而且还具有一些固有的挑战。尽管最近的一些研究努力,但我们仍然没有明确了解开发基于ML的申请和当前行业实践的挑战。此外,目前尚不清楚软件工程研究人员应将其努力集中起来,以更好地支持ML应用程序开发人员。在本文中,我们报告了一个旨在了解ML应用程序开发的挑战和最佳实践的调查。我们合成从80名从业者(以不同的技能,经验和应用领域)获得的结果为17个调查结果;概述ML应用程序开发的挑战和最佳实践。参与基于ML的软件系统发展的从业者可以利用总结最佳实践来提高其系统的质量。我们希望报告的挑战将通知研究界有关需要调查的主题,以改善工程过程和基于ML的申请的质量。
translated by 谷歌翻译
对开发人员的领域专业知识的准确评估对于分配适当的候选人来为项目做出贡献或参加工作职位很重要。由于潜在的候选人可以来自大型池,因此对该领域专业知识的自动评估是一个理想的目标。尽管以前的方法在单个软件项目中取得了成功,但对开发人员的领域专业知识的评估跨多个项目的贡献更具挑战性。在本文中,我们采用DOC2VEC来代表开发人员的领域专业知识作为嵌入向量。这些向量来自包含开发人员专业知识的证据的不同来源,例如对他们贡献的存储库的描述,解决历史的问题以及API在他们的委托中呼吁。我们将其命名为Dev2Vec,并证明其在代表开发人员的技术专业化方面的有效性。我们的结果表明,编码开发人员在嵌入矢量中的专业知识优于最先进的方法,并提高了F1得分高达21%。此外,我们的发现表明,开发人员的``问题解决历史''是代表开发人员在嵌入空间中的领域专业知识的最有用的信息来源。
translated by 谷歌翻译