[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-119142-en":3,"doc-seo-119142-105":30,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},119142,8796095462418,"Noah","https://ap-avatar.wpscdn.com/avatar/80000253c1241d02b47?x-image-process=image/resize,m_fixed,w_180,h_180&k=1778826106357471780",6,"Technology","MLGuard - Defend Your Machine Learning Model!","Machine Learning (ML) is increasingly applied in critical, highly regulated, high-stakes domains such as finance, medicine, and transportation, where correctness directly impacts safety and economic value. Existing testing and monitoring improvements still lack contract-style pre/post conditions for uncertainty, probabilistic corrective actions, and continual verification during system operation. This paper introduces MLGuard as a contract-based framework with specification of pre/post conditions, invariants, and altering behaviors, validation model generation for violation probability, and a wrapper generator that enforces contracts and responds to violations.","MLGuard: Defend Your Machine Learning Model!  \nSheng Wong Scott Barnett  \n[wongsh@deakin.edu.au](wongsh@deakin.edu.au)[ ](wongsh@deakin.edu.au)[scott.barnett@deakin.edu.au](scott.barnett@deakin.edu.au)[ ](scott.barnett@deakin.edu.au)Deakin University Melbourne, Victoria, Australia  \nJessica Rivera-Villicana  \n[jessica.rivera.villicana@rmit.edu.au](jessica.rivera.villicana@rmit.edu.au)[ ](jessica.rivera.villicana@rmit.edu.au)RMIT University Melbourne, Victoria, Australia  \nAnj Simmons Hala Abdelkader  \n[a.simmons@deakin.edu.au](a.simmons@deakin.edu.au)[ ](a.simmons@deakin.edu.au)[h.abdelkader@deakin.edu.au](h.abdelkader@deakin.edu.au)[ ](h.abdelkader@deakin.edu.au)Deakin University Melbourne, Victoria, Australia  \nJean-Guy Schneider  \n[Jean-Guy.Schneider@monash.edu](Jean-Guy.Schneider@monash.edu)[ ](Jean-Guy.Schneider@monash.edu)Monash University Clayton, Victoria, Australia  \nABSTRACT  \nMachine Learning (ML) is used in critical highly regulated and high-stakes 􀀛elds such as 􀀛nance, medicine, and transportation. The correctness of these ML applications is important for human safety and economic bene􀀛t. Progress has been made on improving ML testing and monitoring of ML. However, these approaches do not provide i) pre/post conditions to handle uncertainty, ii) de􀀛ning corrective actions based on probabilistic outcomes, or iii) continual veri􀀛cation during system operation. In this paper, we propose MLGuard, a new approach to specify contracts for ML applications. Our approach consists of a) an ML contract speci􀀛cation de􀀛ning pre/post conditions, invariants, and altering behaviours, b) generated validation models to determine the probability of contract violation, and c) an ML wrapper generator to enforce the contract and respond to violations. Our work is intended to provide the overarching framework required for building ML applications and monitoring their safety.  \nCCS CONCEPTS  \n• Software and its engineering → Software creation and management; • Computing methodologies → Machine learning.  \nKEYWORDS  \ndesign by contract, error handling, system validation, ML validation  \nACM Reference Format:  \nSheng Wong, Scott Barnett, Jessica Rivera-Villicana, Anj Simmons, Hala Abdelkader, Jean-Guy Schneider, and Rajesh Vasa. 2023. MLGuard: Defend Your Machine Learning Model!. In Proceedings of the 1st International Workshop on Dependability and Trustworthiness of Safety-Critical Systems with Machine Learned Components (SE4SafeML’23), December 4, 2023, San Francisco, CA, USA. ACM, New York, NY, USA, 4 pages. [https:](https:)//[doi.org/10.1145/3617574.3617859](doi.org/10.1145/3617574.3617859)  \nThis work is licensed under a Creative Commons Attribution 4 .0 International License.  \nSE4SafeML’23, December 4, 2023, San Francisco, CA, USA © 2023 Copyright held by the owner/author(s) .  \nACM ISBN 979-8-4007-0379-9/23/12 .  \n[https://doi.org/10.1145/3617574.3617859](https://doi.org/10.1145/3617574.3617859)  \nRajesh Vasa [rajesh.vasa@deakin.edu.au](rajesh.vasa@deakin.edu.au)  \nDeakin University Melbourne, Victoria, Australia  \n1 INTRODUCTION  \nRobustness in business software where the domain is well understood is achieved through software testing, and adherence to best practices and processes. However, for Machine Learning (ML) systems this is insu􀀜cient. ML systems are dependent on data input streams that are non-stationary. As a result, ML is behaviour is underspeci􀀛ed [5] in the presence of subtle changes in the data (i.e. data shift [15]) . Data schema validation alone is insu􀀜cient as detecting violations of these conditions, e.g., out of distribution data [10], can only be done probabilistically. We hypothesise that robustness can be incrementally realised in the context of ML through an interface speci􀀛cation (contract) that a) operates on point-estimates and distributions, b) encapsulates modelling assumptions, and c) models uncertainty as a 􀀛rst class citizen.  \nTo achieve robustness for ML, research has focused on testing against noi","cbCairB1KmXhUIzw","https://ap.wps.com/l/cbCairB1KmXhUIzw","pdf",220550,1,4,"English","en",105,"# Introduction\n## ML challenges in non-stationary, high-stakes settings\n## Data validation and monitoring limitations\n## MLGuard overview: contract specification and enforcement","[{\"question\":\"What problem does MLGuard address in machine learning systems?\",\"answer\":\"MLGuard addresses the need for robustness in non-stationary, high-stakes ML environments where correctness cannot be guaranteed by deterministic testing or data validation alone. It targets uncertainty handling, probabilistic violation understanding, and continual verification during operation.\"},{\"question\":\"What are the core components of MLGuard?\",\"answer\":\"MLGuard consists of an ML contract specification (pre/post conditions, invariants, and altering behaviors), generated validation models that estimate the probability of contract violation, and an ML wrapper generator that enforces contracts and triggers violation handling.\"},{\"question\":\"How does MLGuard respond when contract violations occur?\",\"answer\":\"An ML wrapper generator enforces the contract and triggers contract violation handling logic when violations are detected, using validation models to determine the probability of violation.\"}]","MLGuard - Defend Your Machine Learning Model! | PDF",1785722679,10,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":28},"mlguard-defend-your-machine-learning-model","",{"@graph":36,"@context":84},[37,53,67],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/technology/",3,{"item":52,"name":13,"@type":43,"position":21},"https://docshare.wps.com/document/mlguard-defend-your-machine-learning-model/119142/",{"url":52,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-08-03",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What problem does MLGuard address in machine learning systems?","Question",{"text":74,"@type":75},"MLGuard addresses the need for robustness in non-stationary, high-stakes ML environments where correctness cannot be guaranteed by deterministic testing or data validation alone. It targets uncertainty handling, probabilistic violation understanding, and continual verification during operation.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"What are the core components of MLGuard?",{"text":79,"@type":75},"MLGuard consists of an ML contract specification (pre/post conditions, invariants, and altering behaviors), generated validation models that estimate the probability of contract violation, and an ML wrapper generator that enforces contracts and triggers violation handling.",{"name":81,"@type":72,"acceptedAnswer":82},"How does MLGuard respond when contract violations occur?",{"text":83,"@type":75},"An ML wrapper generator enforces the contract and triggers contract violation handling logic when violations are detected, using validation models to determine the probability of violation.","https://schema.org",{"og:url":52,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,112,117,122,127,130,133],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":21,"doc_module":4,"doc_module_name":46,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":46,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":110,"slug":111},50,"technology",{"id":113,"doc_module":4,"doc_module_name":46,"category_name":114,"show_sort_weight":115,"slug":116},7,"Healthcare",40,"healthcare",{"id":118,"doc_module":4,"doc_module_name":46,"category_name":119,"show_sort_weight":120,"slug":121},8,"Research & Report",30,"research-report",{"id":123,"doc_module":4,"doc_module_name":46,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":46,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":29,"doc_module":4,"doc_module_name":46,"category_name":131,"show_sort_weight":29,"slug":132},"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":46,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]