Da Teoria à Implantação: Um Framework Metodológico para In-Network Machine Learning em Redes Programáveis
Resumo
O aprendizado de máquina tem se consolidado como componente central em redes de computadores, e a evolução dos dispositivos programáveis viabilizou o paradigma de In-Network ML, permitindo inferências na velocidade do hardware. No entanto, a adoção prática e a materialização dessas soluções enfrentam barreiras significativas devido a restrições arquiteturais e à carência de metodologias consolidadas, resultando frequentemente em abordagens restritas a algoritmos ou hardwares específicos. Para preencher essa lacuna, este artigo propõe uma metodologia estruturada e um framework generalista para orientar a materialização de pipelines de In-Network ML. O roteiro conecta desde a preparação de dados e treinamento offline até a tradução da lógica de inferência para Tabelas compatíveis com a linguagem P4. A reprodutibilidade da proposta é demonstrada por meio de um caso de uso de classificação de tráfego utilizando uma Árvore de Decisão em um ambiente virtualizado com o switch BMv2. Os resultados evidenciam a viabilidade da implantação, com baixo overhead de recursos, como um aumento médio de apenas 7,3% no uso de CPU.Referências
Bosshart, P., Daly, D., Gibb, G., Izzard, M., McKeown, N., Rexford, J., Schlesinger, C., Talayco, D., Vahdat, A., Varghese, G., and Walker, D. (2014). P4: Programming protocol-independent packet processors. SIGCOMM Comput. Commun. Rev., 44(3):87–95.
Boutaba, R., Salahuddin, M., Limam, N., Ayoubi, S., Shahriar, N., Estrada-Solano, F., and Caicedo Rendon, O. (2018). A comprehensive survey on machine learning for networking: Evolution, applications and research opportunities. Journal of Internet Services and Applications, 9.
Casado, M., Freedman, M. J., Pettit, J., Luo, J., McKeown, N., and Shenker, S. (2007). Ethane: Taking control of the enterprise. In Proceedings of the 2007 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, SIGCOMM ’07, page 1–12, New York, NY, USA. Association for Computing Machinery.
Gebara, N., Ghobadi, M., and Costa, P. (2021). In-network aggregation for shared machine learning clusters. In Smola, A., Dimakis, A., and Stoica, I., editors, Proceedings of Machine Learning and Systems, volume 3, pages 829–844.
Hauser, F., Häberle, M., Merling, D., Lindner, S., Gurevich, V., Zeiger, F., Frank, R., and Menth, M. (2021). A survey on data plane programming with p4: Fundamentals, advances, and applied research.
Kianpisheh, S. and Taleb, T. (2023). A survey on in-network computing: Programmable data plane and technology specific applications. IEEE Communications Surveys & Tutorials.
Kurose, J. F. and Ross, K. W. (2016). Computer Networking: A Top-Down Approach. Pearson, Boston, MA, 7 edition.
Lao, C., Le, Y., Mahajan, K., Chen, Y., Wu, W., Akella, A., and Swift, M. (2021). ATP: In-network aggregation for multi-tenant learning. In 18th USENIX Symposium on Networked Systems Design and Implementation (NSDI 21), pages 741–761. USENIX Association.
McKeown, N., Anderson, T., Balakrishnan, H., Parulkar, G., Peterson, L., Rexford, J., Shenker, S., and Turner, J. (2008). Openflow: Enabling innovation in campus networks. SIGCOMM Comput. Commun. Rev., 38(2):69–74.
Nguyen, H. N., Nguyen, M.-D., and Montes de Oca, E. (2024). A framework for in-network inference using p4. In Proceedings of the 19th International Conference on Availability, Reliability and Security, ARES ’24, New York, NY, USA. Association for Computing Machinery.
Sada, M. F., Graham, J., Tatineni, M., Mishin, D., DeFanti, T., and Würthwein, F. (2025). Real-time in-network machine learning on p4-programmable fpga smartnics with fixed-point arithmetic and taylor approximations. In Practice and Experience in Advanced Research Computing 2025: The Power of Collaboration, PEARC ’25, New York, NY, USA. Association for Computing Machinery.
Sapio, A., Canini, M., Ho, C.-Y., Nelson, J., Kalnis, P., Kim, C., Krishnamurthy, A., Moshref, M., Ports, D., and Richtarik, P. (2021). Scaling distributed machine learning with In-Network aggregation. In 18th USENIX Symposium on Networked Systems Design and Implementation (NSDI 21), pages 785–808. USENIX Association.
Wang, S., Tuor, T., Salonidis, T., Leung, K. K., Makaya, C., He, T., and Chan, K. (2020). When machine learning meets networking: A survey. IEEE Communications Surveys & Tutorials, 22(3):1609–1626.
Xiong, Z. and Zilberman, N. (2019). Do switches dream of machine learning? toward in-network classification. In Proceedings of the 18th ACM Workshop on Hot Topics in Networks, HotNets ’19, page 25–33, New York, NY, USA. Association for Computing Machinery.
Zhang, K., Samaan, N., and Karmouch, A. (2024). A machine learning-based toolbox for p4 programmable data-planes. IEEE Transactions on Network and Service Management, 21(4):4450–4465.
Zhang, K., Zheng, C., Samaan, N., Karmouch, A., and Zilberman, N. (2026). Design, implementation, and deployment of multi-task neural networks in programmable data-planes. IEEE Transactions on Network and Service Management, 23:740–755.
Zheng, C., Hong, X., Ding, D., Vargaftik, S., Ben-Itzhak, Y., and Zilberman, N. (2024a). In-network machine learning using programmable network devices: A survey. IEEE Communications Surveys & Tutorials, 26(2):1171–1200.
Zheng, C., Zang, M., Hong, X., Perreault, L., Bensoussane, R., Vargaftik, S., Ben-Itzhak, Y., and Zilberman, N. (2024b). Planter: Rapid prototyping of in-network machine learning inference. SIGCOMM Comput. Commun. Rev., 54(1):2–21.
Zhou, G., Liu, Z., Fu, C., Li, Q., and Xu, K. (2023). An efficient design of intelligent network data plane. In Proceedings of the 32nd USENIX Conference on Security Symposium, SEC ’23, USA. USENIX Association.
Boutaba, R., Salahuddin, M., Limam, N., Ayoubi, S., Shahriar, N., Estrada-Solano, F., and Caicedo Rendon, O. (2018). A comprehensive survey on machine learning for networking: Evolution, applications and research opportunities. Journal of Internet Services and Applications, 9.
Casado, M., Freedman, M. J., Pettit, J., Luo, J., McKeown, N., and Shenker, S. (2007). Ethane: Taking control of the enterprise. In Proceedings of the 2007 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, SIGCOMM ’07, page 1–12, New York, NY, USA. Association for Computing Machinery.
Gebara, N., Ghobadi, M., and Costa, P. (2021). In-network aggregation for shared machine learning clusters. In Smola, A., Dimakis, A., and Stoica, I., editors, Proceedings of Machine Learning and Systems, volume 3, pages 829–844.
Hauser, F., Häberle, M., Merling, D., Lindner, S., Gurevich, V., Zeiger, F., Frank, R., and Menth, M. (2021). A survey on data plane programming with p4: Fundamentals, advances, and applied research.
Kianpisheh, S. and Taleb, T. (2023). A survey on in-network computing: Programmable data plane and technology specific applications. IEEE Communications Surveys & Tutorials.
Kurose, J. F. and Ross, K. W. (2016). Computer Networking: A Top-Down Approach. Pearson, Boston, MA, 7 edition.
Lao, C., Le, Y., Mahajan, K., Chen, Y., Wu, W., Akella, A., and Swift, M. (2021). ATP: In-network aggregation for multi-tenant learning. In 18th USENIX Symposium on Networked Systems Design and Implementation (NSDI 21), pages 741–761. USENIX Association.
McKeown, N., Anderson, T., Balakrishnan, H., Parulkar, G., Peterson, L., Rexford, J., Shenker, S., and Turner, J. (2008). Openflow: Enabling innovation in campus networks. SIGCOMM Comput. Commun. Rev., 38(2):69–74.
Nguyen, H. N., Nguyen, M.-D., and Montes de Oca, E. (2024). A framework for in-network inference using p4. In Proceedings of the 19th International Conference on Availability, Reliability and Security, ARES ’24, New York, NY, USA. Association for Computing Machinery.
Sada, M. F., Graham, J., Tatineni, M., Mishin, D., DeFanti, T., and Würthwein, F. (2025). Real-time in-network machine learning on p4-programmable fpga smartnics with fixed-point arithmetic and taylor approximations. In Practice and Experience in Advanced Research Computing 2025: The Power of Collaboration, PEARC ’25, New York, NY, USA. Association for Computing Machinery.
Sapio, A., Canini, M., Ho, C.-Y., Nelson, J., Kalnis, P., Kim, C., Krishnamurthy, A., Moshref, M., Ports, D., and Richtarik, P. (2021). Scaling distributed machine learning with In-Network aggregation. In 18th USENIX Symposium on Networked Systems Design and Implementation (NSDI 21), pages 785–808. USENIX Association.
Wang, S., Tuor, T., Salonidis, T., Leung, K. K., Makaya, C., He, T., and Chan, K. (2020). When machine learning meets networking: A survey. IEEE Communications Surveys & Tutorials, 22(3):1609–1626.
Xiong, Z. and Zilberman, N. (2019). Do switches dream of machine learning? toward in-network classification. In Proceedings of the 18th ACM Workshop on Hot Topics in Networks, HotNets ’19, page 25–33, New York, NY, USA. Association for Computing Machinery.
Zhang, K., Samaan, N., and Karmouch, A. (2024). A machine learning-based toolbox for p4 programmable data-planes. IEEE Transactions on Network and Service Management, 21(4):4450–4465.
Zhang, K., Zheng, C., Samaan, N., Karmouch, A., and Zilberman, N. (2026). Design, implementation, and deployment of multi-task neural networks in programmable data-planes. IEEE Transactions on Network and Service Management, 23:740–755.
Zheng, C., Hong, X., Ding, D., Vargaftik, S., Ben-Itzhak, Y., and Zilberman, N. (2024a). In-network machine learning using programmable network devices: A survey. IEEE Communications Surveys & Tutorials, 26(2):1171–1200.
Zheng, C., Zang, M., Hong, X., Perreault, L., Bensoussane, R., Vargaftik, S., Ben-Itzhak, Y., and Zilberman, N. (2024b). Planter: Rapid prototyping of in-network machine learning inference. SIGCOMM Comput. Commun. Rev., 54(1):2–21.
Zhou, G., Liu, Z., Fu, C., Li, Q., and Xu, K. (2023). An efficient design of intelligent network data plane. In Proceedings of the 32nd USENIX Conference on Security Symposium, SEC ’23, USA. USENIX Association.
Publicado
25/05/2026
Como Citar
SILVA, Icaro M. da; SILVA, Caio Luiz L. T.; GOUVEIA, Thiago; ALMEIDA, Leandro C. de.
Da Teoria à Implantação: Um Framework Metodológico para In-Network Machine Learning em Redes Programáveis. In: WORKSHOP DE INTELIGÊNCIA ARTIFICIAL PARA REDES DE COMPUTADORES (WIARC), 1. , 2026, Praia do Forte/BA.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 57-70.
DOI: https://doi.org/10.5753/wiarc.2026.23595.
