Mousika Series of In-Network Intelligence in INFOCOM22 and ToN23
More information about us https://xgr19.github.io
This repository consists of two branches, the "main" branch provides the demo code of generating distilled BDT from RF and then installing it to switches, "Mousikav2" branch provides the whole distillation codes in the extended ToN version.
We hope that our another In-network intelligence work Soter would be also helpful for you.
Code Architecture
-- Distillation
-- code
-- train_teacher.py(train the teacher model)
-- bdt_test.py(an example for distilling the model from teacher model to BDT)
-- dt_test.py(train DT model)
-- SoftTree.py(the class of soft DT, which supports tree distillation)
-- Tree.py(the original DT)
-- utils.py(include the load-data function)
-- Dataset/(univ.zip is the flow size prediction task dataset, both
the continuous feature 'univ_C' and binary feature 'univ' are stored here)
-- models/(teacher model)
-- result_acc/
-- rule_tree/(store rules.txt of bdt_test.py)
-- rule2entry
-- code
-- rule2entry.py(convert rule of DT to ternary entry of P4 table)
-- entry2dataplane.py(load ternary entry and send to P4 dataplane)
-- output
-- rule_tree/(copy Distillation/rule_tree/*.txt to here)
-- ternary_entry/(generated P4 tale entries from rules.txt)
-- P4
-- flowcontrol.p4(implementation of P4 data plane)