ADELT: Transpilation Between Deep Learning Frameworks

03/07/2023
by   Linyuan Gong, et al.
0

We propose Adversarial DEep Learning Transpiler (ADELT) for source-to-source transpilation between deep learning frameworks. Unlike prior approaches, we decouple the transpilation of code skeletons and the mapping of API keywords (an API function name or a parameter name). ADELT transpile code skeletons using few-shot prompting on big language models. Based on contextual embeddings extracted by a BERT for code, we train aligned API embeddings in a domain-adversarial setup, upon which we generate a dictionary for keyword translation. The model is trained on our unlabeled DL corpus from web crawl data, without using any hand-crafted rules and parallel data. Our method outperforms state-of-the-art transpilers on multiple transpilation pairs including PyTorch-Keras and PyTorch-MXNet by 15.9pts and 12.0pts in exact match scores respectively.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/01/2023

Automatic Unit Test Generation for Deep Learning Frameworks based on API Knowledge

Many automatic unit test generation tools that can generate unit test ca...
research
12/30/2022

Fuzzing Deep-Learning Libraries via Large Language Models

Detecting bugs in Deep Learning (DL) libraries is critical for almost al...
research
01/24/2022

Challenges in Migrating Imperative Deep Learning Programs to Graph Execution: An Empirical Study

Efficiency is essential to support responsiveness w.r.t. ever-growing da...
research
04/25/2017

DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning

Computer programs written in one language are often required to be porte...
research
04/27/2023

TorchBench: Benchmarking PyTorch with High API Surface Coverage

Deep learning (DL) has been a revolutionary technique in various domains...
research
02/01/2021

Automatically Identifying Parameter Constraints in Complex Web APIs: A Case Study at Adyen

Web APIs may have constraints on parameters, such that not all parameter...
research
07/23/2019

On Using Machine Learning to Identify Knowledge in API Reference Documentation

Using API reference documentation like JavaDoc is an integral part of so...

Please sign up or login with your details

Forgot password? Click here to reset