Publications

Detailed Information

A Static Analyzer for Detecting Tensor Shape Errors in Deep Neural Network Training Code : 심층신경망 학습 코드의 텐서 형상 에러를 찾아내는 정적분석기

Cited 0 time in Web of Science Cited 0 time in Scopus
Authors

주호영

Advisor
허충길
Issue Date
2022
Publisher
서울대학교 대학원
Keywords
StaticanalysisdeeplearningtensorshapeerrorSMTsolverPythonPyTorch
Description
학위논문(석사) -- 서울대학교대학원 : 공과대학 컴퓨터공학부, 2022. 8. 허충길.
Abstract
This thesis presents an automatic static analyzer PyTea that detects tensor-shape errors in PyTorch code. The tensor-shape error is critical in the deep neural net code; much of the training cost and intermediate results are to be lost once a tensor shape mismatch occurs in the midst of the training phase. Given the input PyTorch source, PyTea statically traces every possible execution path, collects tensor shape constraints required by the tensor operation sequence of the path, and decides if the constraints are unsatisfiable (hence a shape error can occur). PyTeas scalability and precision hinges on the characteristics of real-world PyTorch applications: the number of execution paths after PyTeas conservative pruning rarely explodes and loops are simple enough to be circumscribed by symbolic abstraction. PyTea is tested against the projects in the official PyTorch repository and some tensor-error code questioned in the StackOverflow. PyTea successfully detects tensor shape errors in these codes, each within a few seconds.
본 논문은 PyTorch 코드에서 텐서 형상 오류를 검출하는 자동 정적분석기 PyTea를 소개한다. 텐서 형상 오류는 한번 일어나면 많은 학습 시간과 중간 결과를 잃어버릴 수 있기에 심층신경망 학습에 있어 매우 중요한 부분을 차지한다. PyTea는 PyTorch 코드를 받아 모든 가능한 실행경로를 정적으로 분석하고, 각 경로마다 텐서 연산이 오류없이 수행될 수 있는 텐서 형상의 조건을 모은 뒤, 그 조건들을 전부 만족시킬수 있는지 없는지를 판단하여 텐서 형상 오류가 있는지를 감지한다. PyTea의 확장성과 정확성은 PyTea의 심볼릭 축약 및 경로 단순화 후 남은 경로 갯수가 많지 않으며, 반복문의 실행 횟수도 충분히 작다는 실제 PyTorch 프로그램의 특성에 기반한다. PyTea는 공식 PyTorch 코드 저장소와 StackOverflow의 텐서 오류 코드를 기반으로 테스트 되었으며, 이러한 실험에서 모두 수 초 이내로 텐서 형상 오류를 검출하였다.
Language
eng
URI
https://hdl.handle.net/10371/187766

https://dcollection.snu.ac.kr/common/orgView/000000172063
Files in This Item:
Appears in Collections:

Altmetrics

Item View & Download Count

  • mendeley

Items in S-Space are protected by copyright, with all rights reserved, unless otherwise indicated.

Share