{"id":{"repo_id":"iastate","oai_identifier":"oai:dr.lib.iastate.edu:20.500.12876/OrD8MVVr"},"canonical_url":"https://search.ndltd.org/etd/iastate/oai:dr.lib.iastate.edu:20.500.12876/OrD8MVVr","repository":{"repo_id":"iastate","name":"Iowa State University","base_url":"https://dr.lib.iastate.edu/server/oai/request"},"display":{"title":"Design by contract for deep learning APIs and models","abstract":"Deep Learning (DL) is increasingly used in critical software, but these systems are often black boxes. When a DL model predicts an output for a given input, it is unclear whether that output can be trusted, especially if the input comes from an unknown region, one that the model may not have been trained on. Therefore, trained DL models pose challenges in ensuring trustworthy predictions during deployment. Furthermore, DL systems are prone to bugs, which can be prevented by specifying contracts. Due to the complexity of DL model architecture and expected output, existing methods for specifying traditional software are insufficient for specifying DL software. This dissertation presents some innovative techniques for ensuring the reliability of DL model's output. In the first approach, DeepInfer, data precondition has been introduced. Data preconditions, derived from a trained DL model's weights and biases, determine the trustworthiness of the model's predictions during deployment by checking precondition violation of unknown input. We extensively evaluated DeepInfer on 29 real-world DNN models using four different datasets, demonstrating its utility, effectiveness, and performance improvements, significantly outperforming SelfChecker and being 3.27 times faster. Second, a feature debugging technique has been proposed that determines feature importance by inferring the trained model's assumption about the input features. Therefore, our proposed technique enhances the explainability of the DL model without retraining or modifying the model, allowing developers to debug models by removing less important features. In the evaluation, using real-world data from prior work, our proposed technique successfully identifies important features in both classification and regression models, demonstrating high recall and significantly faster performance than comparable state-of-the-art techniques. Third, to ensure the reliability of DL software, we have introduced contract layer to the deep learning library to intercept API calls, which enables checking the contracts to detect and fix bugs in deep learning programs that cause unreliable output and are not detected by DL libraries. Our approach identified 259 performance bugs out of 272 real-world buggy programs efficiently with less overhead compared to existing tools, and user surveys demonstrated its effectiveness for DL application debugging. Lastly, this dissertation provides a comprehensive investigation and evaluation of our proposed techniques, emphasizing their effectiveness, efficiency, and limitations, and also suggests some future directions in the exciting field of Software Engineering for trustworthy AI.","abstract_html":"Deep Learning (DL) is increasingly used in critical software, but these systems are often black boxes. When a DL model predicts an output for a given input, it is unclear whether that output can be trusted, especially if the input comes from an unknown region, one that the model may not have been trained on. Therefore, trained DL models pose challenges in ensuring trustworthy predictions during deployment. Furthermore, DL systems are prone to bugs, which can be prevented by specifying contracts. Due to the complexity of DL model architecture and expected output, existing methods for specifying traditional software are insufficient for specifying DL software. This dissertation presents some innovative techniques for ensuring the reliability of DL model&#x27;s output. In the first approach, DeepInfer, data precondition has been introduced. Data preconditions, derived from a trained DL model&#x27;s weights and biases, determine the trustworthiness of the model&#x27;s predictions during deployment by checking precondition violation of unknown input. We extensively evaluated DeepInfer on 29 real-world DNN models using four different datasets, demonstrating its utility, effectiveness, and performance improvements, significantly outperforming SelfChecker and being 3.27 times faster. Second, a feature debugging technique has been proposed that determines feature importance by inferring the trained model&#x27;s assumption about the input features. Therefore, our proposed technique enhances the explainability of the DL model without retraining or modifying the model, allowing developers to debug models by removing less important features. In the evaluation, using real-world data from prior work, our proposed technique successfully identifies important features in both classification and regression models, demonstrating high recall and significantly faster performance than comparable state-of-the-art techniques. Third, to ensure the reliability of DL software, we have introduced contract layer to the deep learning library to intercept API calls, which enables checking the contracts to detect and fix bugs in deep learning programs that cause unreliable output and are not detected by DL libraries. Our approach identified 259 performance bugs out of 272 real-world buggy programs efficiently with less overhead compared to existing tools, and user surveys demonstrated its effectiveness for DL application debugging. Lastly, this dissertation provides a comprehensive investigation and evaluation of our proposed techniques, emphasizing their effectiveness, efficiency, and limitations, and also suggests some future directions in the exciting field of Software Engineering for trustworthy AI.","abstract_has_math":false,"creators":["Ahmed, Shibbir"],"institution":"Iowa State University","degree_name":"Doctor of Philosophy","degree_level":"dissertation","degree_discipline":"Computer science","degree_department":"Department of Computer Science","school":null,"contributors":[],"advisors":["Rajan, Hridesh","Tavanapong, Wallapak","Aduri, Pavan","Gao, Hongyang","Li, Qi"],"committee_chairs":[],"committee_members":[],"year":2024,"date_issued":"2024-08","date_published":"2024-08","updated_at":"2026-11-18T23:59:13Z","subjects":[],"languages":["en"],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://dr.lib.iastate.edu/handle/20.500.12876/OrD8MVVr"],"render_values":[{"text":"https://dr.lib.iastate.edu/handle/20.500.12876/OrD8MVVr","href":"https://dr.lib.iastate.edu/handle/20.500.12876/OrD8MVVr","code":true}]}],"person_identifier_entries":[{"key":"dc:identifier.orcid","label":"ORCID","values":["0000-0003-1183-883X"],"render_values":[{"text":"0000-0003-1183-883X","href":"https://orcid.org/0000-0003-1183-883X","code":true}]}]},"links":{"outbound_url":"https://doi.org/10.31274/td-20250502-191","outbound_label":"DOI","outbound_source":"dc:identifier.doi","record_url":"https://doi.org/10.31274/td-20250502-191","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.doi","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aiastate%3Aoai%3Adr.lib.iastate.edu%3A20.500.12876%2FOrD8MVVr","prefix":"oai_dc"},"source_record":{"url":"https://dr.lib.iastate.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Adr.lib.iastate.edu%3A20.500.12876%2FOrD8MVVr","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Rajan, Hridesh","Tavanapong, Wallapak","Aduri, Pavan","Gao, Hongyang","Li, Qi"]},{"key":"dc:contributor.department","label":"Department","values":["Department of Computer Science"]},{"key":"dc:creator","label":"Author","values":["Ahmed, Shibbir"]},{"key":"dc:identifier.orcid","label":"ORCID","values":["0000-0003-1183-883X"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2024-10-10T15:52:55Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2024-10-10T15:52:55Z"]},{"key":"dc:date.issued","label":"Date","values":["2024-08"]},{"key":"dc:date.updated","label":"Dc Date Updated","values":["2024-10-10T15:52:56Z"]},{"key":"dc:relation.orgunit","label":"Dc Relation Orgunit","values":["f7be4eb9-d1d0-4081-859b-b15cee251456"]},{"key":"dc:type","label":"Dc Type","values":["dissertation"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer science"]},{"key":"thesis:degree_level","label":"Degree Level","values":["dissertation"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Doctor of Philosophy"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Iowa State University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject.discipline","label":"Dc Subject Discipline","values":["Computer science"]},{"key":"dc:subject.keyword","label":"Dc Subject Keyword","values":["API contracts","Deep learning","Deep neural networks","Weakest precondition"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:language.rfc3066","label":"Language (RFC 3066)","values":["en"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.doi","label":"DOI","values":["https://doi.org/10.31274/td-20250502-191"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://dr.lib.iastate.edu/handle/20.500.12876/OrD8MVVr"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Deep Learning (DL) is increasingly used in critical software, but these systems are often black boxes. When a DL model predicts an output for a given input, it is unclear whether that output can be trusted, especially if the input comes from an unknown region, one that the model may not have been trained on. Therefore, trained DL models pose challenges in ensuring trustworthy predictions during deployment. Furthermore, DL systems are prone to bugs, which can be prevented by specifying contracts. Due to the complexity of DL model architecture and expected output, existing methods for specifying traditional software are insufficient for specifying DL software. This dissertation presents some innovative techniques for ensuring the reliability of DL model's output. In the first approach, DeepInfer, data precondition has been introduced. Data preconditions, derived from a trained DL model's weights and biases, determine the trustworthiness of the model's predictions during deployment by checking precondition violation of unknown input. We extensively evaluated DeepInfer on 29 real-world DNN models using four different datasets, demonstrating its utility, effectiveness, and performance improvements, significantly outperforming SelfChecker and being 3.27 times faster. Second, a feature debugging technique has been proposed that determines feature importance by inferring the trained model's assumption about the input features. Therefore, our proposed technique enhances the explainability of the DL model without retraining or modifying the model, allowing developers to debug models by removing less important features. In the evaluation, using real-world data from prior work, our proposed technique successfully identifies important features in both classification and regression models, demonstrating high recall and significantly faster performance than comparable state-of-the-art techniques. Third, to ensure the reliability of DL software, we have introduced contract layer to the deep learning library to intercept API calls, which enables checking the contracts to detect and fix bugs in deep learning programs that cause unreliable output and are not detected by DL libraries. Our approach identified 259 performance bugs out of 272 real-world buggy programs efficiently with less overhead compared to existing tools, and user surveys demonstrated its effectiveness for DL application debugging. Lastly, this dissertation provides a comprehensive investigation and evaluation of our proposed techniques, emphasizing their effectiveness, efficiency, and limitations, and also suggests some future directions in the exciting field of Software Engineering for trustworthy AI."]},{"key":"dc:format.mimetype","label":"Dc Format Mimetype","values":["PDF"]},{"key":"dc:title","label":"Title","values":["Design by contract for deep learning APIs and models"]},{"key":"dspace:entity.type","label":"Dspace Entity Type","values":["Publication"]}]}],"canonical_facts":{"dc:contributor.advisor":["Rajan, Hridesh","Tavanapong, Wallapak","Aduri, Pavan","Gao, Hongyang","Li, Qi"],"dc:contributor.department":["Department of Computer Science"],"dc:creator":["Ahmed, Shibbir"],"dc:date.accessioned":["2024-10-10T15:52:55Z"],"dc:date.available":["2024-10-10T15:52:55Z"],"dc:date.issued":["2024-08"],"dc:date.updated":["2024-10-10T15:52:56Z"],"dc:description.abstract":["Deep Learning (DL) is increasingly used in critical software, but these systems are often black boxes. When a DL model predicts an output for a given input, it is unclear whether that output can be trusted, especially if the input comes from an unknown region, one that the model may not have been trained on. Therefore, trained DL models pose challenges in ensuring trustworthy predictions during deployment. Furthermore, DL systems are prone to bugs, which can be prevented by specifying contracts. Due to the complexity of DL model architecture and expected output, existing methods for specifying traditional software are insufficient for specifying DL software. This dissertation presents some innovative techniques for ensuring the reliability of DL model's output. In the first approach, DeepInfer, data precondition has been introduced. Data preconditions, derived from a trained DL model's weights and biases, determine the trustworthiness of the model's predictions during deployment by checking precondition violation of unknown input. We extensively evaluated DeepInfer on 29 real-world DNN models using four different datasets, demonstrating its utility, effectiveness, and performance improvements, significantly outperforming SelfChecker and being 3.27 times faster. Second, a feature debugging technique has been proposed that determines feature importance by inferring the trained model's assumption about the input features. Therefore, our proposed technique enhances the explainability of the DL model without retraining or modifying the model, allowing developers to debug models by removing less important features. In the evaluation, using real-world data from prior work, our proposed technique successfully identifies important features in both classification and regression models, demonstrating high recall and significantly faster performance than comparable state-of-the-art techniques. Third, to ensure the reliability of DL software, we have introduced contract layer to the deep learning library to intercept API calls, which enables checking the contracts to detect and fix bugs in deep learning programs that cause unreliable output and are not detected by DL libraries. Our approach identified 259 performance bugs out of 272 real-world buggy programs efficiently with less overhead compared to existing tools, and user surveys demonstrated its effectiveness for DL application debugging. Lastly, this dissertation provides a comprehensive investigation and evaluation of our proposed techniques, emphasizing their effectiveness, efficiency, and limitations, and also suggests some future directions in the exciting field of Software Engineering for trustworthy AI."],"dc:format.mimetype":["PDF"],"dc:identifier.doi":["https://doi.org/10.31274/td-20250502-191"],"dc:identifier.orcid":["0000-0003-1183-883X"],"dc:identifier.uri":["https://dr.lib.iastate.edu/handle/20.500.12876/OrD8MVVr"],"dc:language.iso":["en"],"dc:language.rfc3066":["en"],"dc:relation.orgunit":["f7be4eb9-d1d0-4081-859b-b15cee251456"],"dc:subject.discipline":["Computer science"],"dc:subject.keyword":["API contracts","Deep learning","Deep neural networks","Weakest precondition"],"dc:title":["Design by contract for deep learning APIs and models"],"dc:type":["dissertation"],"dspace:entity.type":["Publication"],"thesis:degree_discipline":["Computer science"],"thesis:degree_level":["dissertation"],"thesis:degree_name":["Doctor of Philosophy"],"thesis:institution_name":["Iowa State University"]},"updated_at":"2026-11-18T23:59:13Z"}