{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/fail-safe-execution-of-deep-learning-based","title":"Fail-Safe Execution of Deep Learning based Systems through Uncertainty Monitoring","arxiv_id":"2102.00902","date":"2021-02-01","proceeding":null,"authors":["Michael Weiss","Paolo Tonella"],"abstract":"Modern software systems rely on Deep Neural Networks (DNN) when processing complex, unstructured inputs, such as images, videos, natural language texts or audio signals. Provided the intractably large size of such input spaces, the intrinsic limitations of learning algorithms, and the ambiguity about the expected predictions for some of the inputs, not only there is no guarantee that DNN's predictions are always correct, but rather developers must safely assume a low, though not negligible, error probability. A fail-safe Deep Learning based System (DLS) is one equipped to handle DNN faults by means of a supervisor, capable of recognizing predictions that should not be trusted and that should activate a healing procedure bringing the DLS to a safe state. In this paper, we propose an approach to use DNN uncertainty estimators to implement such a supervisor. We first discuss the advantages and disadvantages of existing approaches to measure uncertainty for DNNs and propose novel metrics for the empirical assessment of the supervisor that rely on such approaches. We then describe our publicly available tool UNCERTAINTY-WIZARD, which allows transparent estimation of uncertainty for regular tf.keras DNNs. Lastly, we discuss a large-scale study conducted on four different subjects to empirically validate the approach, reporting the lessons-learned as guidance for software engineers who intend to monitor uncertainty for fail-safe execution of DLS.","url_abs":"https://arxiv.org/abs/2102.00902v1","url_pdf":"https://arxiv.org/pdf/2102.00902v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"fail-safe-execution-of-deep-learning-based","repo_url":"https://github.com/testingautomated-usi/uncertainty-wizard","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"fail-safe-execution-of-deep-learning-based","repo_url":"https://github.com/testingautomated-usi/repli-icst2021-uncertainty","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2102.00902","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2102.00902"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/testingautomated-usi/repli-icst2021-uncertainty","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/testingautomated-usi/uncertainty-wizard","reach":{"status":"unanswered"}}],"summary":{"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":2,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"ee1a53492228c8b3","entry":"calc_s_scores","repo":"testingautomated-usi/repli-icst2021-uncertainty","repo_kind":"official","path":"emp_uncertainty/case_studies/case_study.py","file_url":"https://github.com/testingautomated-usi/repli-icst2021-uncertainty/blob/HEAD/emp_uncertainty/case_studies/case_study.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee1a53492228c8b3"}},{"code_sha256_prefix":"2da5a63191276f8d","entry":"plot_s_accuracy","repo":"testingautomated-usi/repli-icst2021-uncertainty","repo_kind":"official","path":"emp_uncertainty/results_plotter/sample_size_influence.py","file_url":"https://github.com/testingautomated-usi/repli-icst2021-uncertainty/blob/HEAD/emp_uncertainty/results_plotter/sample_size_influence.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2da5a63191276f8d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}