[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-122302-en":3,"doc-seo-122302-105":29,"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":20,"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":11},122302,1099514067438,"River Wang","https://ap-avatar.wpscdn.com/avatar/100002539ee87300030?x-image-process=image/resize,m_fixed,w_180,h_180&k=1780474512215547542",8,"Research & Report","Showcasing In-Switch Machine Learning Inference - IEEE NetSoft 2023","Trained machine learning models such as Random Forests can be integrated into resource-constrained programmable switches to perform line-rate inference with very low latency. The work demonstrates how packet-level information can classify individual packets directly in production hardware, then introduces Flowrest to improve classification by using flow-level statistics. Experiments on a real-world testbed with an Intel Tofino switch show Flowrest reaching an F1-score of 99% for service classification, outperforming packet-level methods by 8% without materially increasing latency.","This is the author’s accepted version of the article. The final version published by IEEE is A.T.-J. Akem, B. B¨ut¨un, M. Gucciardo, and M. Fiore,“Showcasing In-Switch Machine Learning Inference,” 2023 IEEE Conference on Network Softwarization (IEEE NetSoft 2023), Madrid, Spain, June 2023, doi: [https:](https:)//[doi.org/10.1109/NetSoft57336.2023.10175464](doi.org/10.1109/NetSoft57336.2023.10175464) .  \nShowcasing In-Switch Machine Learning Inference  \nAristide Tanyi-Jong Akem∗†, Beyza B¨ut¨un∗†, Michele Gucciardo∗ , Marco Fiore∗  \n∗ IMDEA Networks Institute, Spain, †Universidad Carlos III de Madrid, Spain  \n{aristide.akem, beyza.butun, michele.gucciardo, [marco.fiore](marco.fiore}@imdea.org)[}](marco.fiore}@imdea.org)[@imdea.org](marco.fiore}@imdea.org)  \nAbstract—Recent endeavours have enabled the integration of trained machine learning models like Random Forests in resource-constrained programmable switches for line rate inference. In this work, we first show how packet-level information can be used to classify individual packets in production-level hardware with very low latency. We then demonstrate how the newly proposed Flowrest framework improves classification performance relative to the packet-level approach by exploiting flow-level statistics to instead classify traffic flows entirely within the switch without considerably increasing latency. We conduct experiments using measurement data in a real-world testbed with an Intel Tofino switch and shed light on how Flowrest achieves an F1-score of 99% in a service classification use case, outperforming its packet-level counterpart by 8% .  \nI. CONTEXT AND MOTIVATION  \nIn modern networking scenarios, machine learning (ML) models are increasingly playing a crucial role in enabling automation, particularly in areas like network security, traffic classification, routing optimization, and quality of service prediction. In the classic software-defined networking (SDN) paradigm, ML models are trained and executed in the control plane. However, since these models cannot operate at line rate, they fail to meet the low latency requirements typical of intelligent next-generation network applications such as industrial automation and remote surgery.  \nThe current availability of commercial programmable data planes, such as Intel Tofino ASICs [1], and domain-specific languages like P4 [2], has opened up new prospects for achieving low-latency and high-throughput inference in networks. Various proposals have suggested encoding trained ML models directly into data plane components, including switches or Smart Network Interface Cards (SmartNICs) .  \nBy deploying ML models directly in the data plane, higher throughput and lower latency inference can be achieved. However, embedding ML models into such devices is a daunting task, notably in the case of switches with strict constraints in terms of memory, support for mathematical operations, and the number of allowed per-packet operations.  \nRecent works [3]–[7] have shown that trained Decision Tree (DT) and Random Forest (RF) models are more adaptable to in-switch inference owing to their logical structure and the simplicity of the mathematical operations involved. However, on account of the constraints above, current solutions fall short in some ways. Firstly, they have limited scalability when it comes to handling complex ML models and challenging classification tasks. Secondly, some of these solutions are only tested in emulation environments and cannot be deployed  \non real hardware, and lastly, they do not support flow-level inference which is better adapted for difficult tasks.  \nII. IN-SWITCH INFERENCE SOLUTION  \nTo address the above shortcomings, during the design phase of RF models offline, we consider the limitations of the programmable switches and customize the features and hyperparameters of the RF models accordingly. The models are then translated into match and action (M/A) table entries for in-switch implementation. Inferenc","cbCaijvFTYxlvvSg","https://ap.wps.com/l/cbCaijvFTYxlvvSg","pdf",732760,1,3,"English","en",105,"# Context and Motivation\n# In-Switch Inference Solution","[{\"question\":\"What problem does the work target in modern networking?\",\"answer\":\"It targets the gap between machine-learning inference needs and the strict low-latency requirements of next-generation network applications, especially because control-plane ML cannot operate at line rate.\"},{\"question\":\"How does the packet-level approach perform classification?\",\"answer\":\"The switch parses packet headers, extracts stateless features such as packet length, transport ports, and flags, and uses them for ML inference.\"},{\"question\":\"How does Flowrest differ from packet-level inference and what performance does it achieve?\",\"answer\":\"Flowrest classifies traffic flows using flow-level statistics stored in switch registers, enabling flow-level inference at line rate; it achieves an F1-score of 99% and improves performance by 8% over the packet-level counterpart.\"}]","Showcasing In-Switch Machine Learning Inference - IEEE NetSoft 2023 | PDF",1785809907,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":28},"showcasing-in-switch-machine-learning-inference-ieee-netsoft-2023","",{"@graph":35,"@context":84},[36,52,67],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,49],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":21},"https://docshare.wps.com/document/research-report/",{"item":50,"name":13,"@type":42,"position":51},"https://docshare.wps.com/document/showcasing-in-switch-machine-learning-inference-ieee-netsoft-2023/122302/",4,{"url":50,"name":13,"@type":53,"author":54,"headline":13,"publisher":56,"fileFormat":59,"inLanguage":23,"description":14,"dateModified":60,"datePublished":61,"encodingFormat":59,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":55},"Person",{"url":40,"name":57,"@type":58},"DocShare","Organization","application/pdf","2026-08-05","2026-08-04",true,{"@type":64,"interactionType":65,"userInteractionCount":20},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What problem does the work target in modern networking?","Question",{"text":74,"@type":75},"It targets the gap between machine-learning inference needs and the strict low-latency requirements of next-generation network applications, especially because control-plane ML cannot operate at line rate.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does the packet-level approach perform classification?",{"text":79,"@type":75},"The switch parses packet headers, extracts stateless features such as packet length, transport ports, and flags, and uses them for ML inference.",{"name":81,"@type":72,"acceptedAnswer":82},"How does Flowrest differ from packet-level inference and what performance does it achieve?",{"text":83,"@type":75},"Flowrest classifies traffic flows using flow-level statistics stored in switch registers, enabling flow-level inference at line rate; it achieves an F1-score of 99% and improves performance by 8% over the packet-level counterpart.","https://schema.org",{"og:url":50,"og:type":86,"og:title":13,"og:site_name":57,"og:description":14},"article",{"robots":88,"canonical":50},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,114,119,122,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":51,"doc_module":4,"doc_module_name":45,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":45,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":45,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":105,"slug":137},19,"General","general"]