arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2107.00157cs.AIcs.LG
收藏

统计类型推断的跨语言迁移学习

Cross-Lingual Transfer Learning for Statistical Type Inference

Nanyang Technological University(南洋理工大学);Singapore Management University(新加坡管理大学);City University of Hong Kong(香港城市大学)

Zhiming Li, Xiaofei Xie, Haoliang Li, Zhengzi Xu, Yi Li, Yang Liu

摘要:

高度统计类型推断系统完全依赖于监督学习方法,这需要费力的人工努力来收集和标记大量数据。大多数图灵完备命令式语言共享类似的控制流和数据流结构,这使得将从一种语言学到的知识转移到另一种语言成为可能。在本文中,我们提出了一个用于统计类型推断的跨语言迁移学习框架PLATO,它允许我们利用从一种语言的标记数据集学习的先验知识并将其转移到其他语言,例如,Python到JavaScript,Java到JavaScript,等等。PLATO由一种新颖的内核化注意力机制提供动力,以约束骨干Transformer模型的注意力范围,从而迫使模型将其预测基于语言之间的共同共享功能。此外,我们提出了语法增强,增强学习的语言域之间的特征重叠。此外,PLATO还可以用于通过引入跨语言增强来改善传统的基于监督学习的类型推断的性能,这使得模型能够跨多种语言学习更一般的特征。我们在两种情况下对PLATO进行了评估:1)在跨领域的情况下,目标语言数据没有标记或部分标记,结果表明PLATO在很大程度上优于最先进的领域转移技术,例如,它将Python到TypeScript的基线提高了+5.40%@EM,+5.40%@weighted-F1,以及2)在传统的基于单语监督学习的场景下,PLATO将Python基线提高了+4.40%@EM,+3.20%@EM(参数)。

英文摘要:

Hitherto statistical type inference systems rely thoroughly on supervised learning approaches, which require laborious manual effort to collect and label large amounts of data. Most Turing-complete imperative languages share similar control- and data-flow structures, which make it possible to transfer knowledge learned from one language to another. In this paper, we propose a cross-lingual transfer learning framework, PLATO, for statistical type inference, which allows us to leverage prior knowledge learned from the labeled dataset of one language and transfer it to the others, e.g., Python to JavaScript, Java to JavaScript, etc. PLATO is powered by a novel kernelized attention mechanism to constrain the attention scope of the backbone Transformer model such that the model is forced to base its prediction on commonly shared features among languages. In addition, we propose the syntax enhancement that augments the learning on the feature overlap among language domains. Furthermore, PLATO can also be used to improve the performance of the conventional supervised learning-based type inference by introducing cross-lingual augmentation, which enables the model to learn more general features across multiple languages. We evaluated PLATO under two settings: 1) under the cross-domain scenario that the target language data is not labeled or labeled partially, the results show that PLATO outperforms the state-of-the-art domain transfer techniques by a large margin, e.g., it improves the Python to TypeScript baseline by +5.40%@EM, +5.40%@weighted-F1, and 2) under the conventional monolingual supervised learning based scenario, PLATO improves the Python baseline by +4.40%@EM, +3.20%@EM (parametric).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑