{"title":"Structure verification of deep neural networks at compilation time using dependent types","authors":"Leonardo Piñeyro, Alberto Pardo, Marcos Viera","doi":"10.1145/3355378.3355379","DOIUrl":null,"url":null,"abstract":"This paper presents TensorSafe, a dependently typed Haskell library which makes possible the definition and structural validation of deep neural networks architectures. Nowadays, the development process of deep learning models has been notably simplified due to the availability of sophisticated tools in the industry. However, most of these tools do not provide any security controls at compilation time, making the developers deal with unexpected run-time errors and uncertainties. In particular, validating the structure of deep neural networks at compilation time is a complex subject which involves the mathematical validation of all operations that a deep learning model will perform. Moreover, this structural checking requires an advanced usage of types systems theories to manipulate abstract type definitions capable of modeling neural networks constructions. Many different programming techniques were involved in the specification of TensorSafe. Primarily, the application of the functional programming paradigm and the use of dependent types were of great importance for the development process and to probe the correctness of the neural network models. The experimental evaluation showed that by using TensorSafe it is possible to correctly create well known deep neural network architectures, such like MNIST or ResNet50.","PeriodicalId":429937,"journal":{"name":"Proceedings of the XXIII Brazilian Symposium on Programming Languages","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the XXIII Brazilian Symposium on Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3355378.3355379","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5
Abstract
This paper presents TensorSafe, a dependently typed Haskell library which makes possible the definition and structural validation of deep neural networks architectures. Nowadays, the development process of deep learning models has been notably simplified due to the availability of sophisticated tools in the industry. However, most of these tools do not provide any security controls at compilation time, making the developers deal with unexpected run-time errors and uncertainties. In particular, validating the structure of deep neural networks at compilation time is a complex subject which involves the mathematical validation of all operations that a deep learning model will perform. Moreover, this structural checking requires an advanced usage of types systems theories to manipulate abstract type definitions capable of modeling neural networks constructions. Many different programming techniques were involved in the specification of TensorSafe. Primarily, the application of the functional programming paradigm and the use of dependent types were of great importance for the development process and to probe the correctness of the neural network models. The experimental evaluation showed that by using TensorSafe it is possible to correctly create well known deep neural network architectures, such like MNIST or ResNet50.