Algorithm 2. An overview of P2P-KD for Domain-IL

1. t = 2

2. while true do

3. Input: previous model M t 1 , training dataset D t , other hyper-parameters for

4. Algorithm 1: p , k , α

5. Output: model M t

6. Initialize M t = M t 1

7. Freeze M t 1

8. while true do

9. Sample a batch dataset D from D t

10. Get D t r a n s , D p r i , D p u b using Algorithm 1

11. D p u b = D p u b D t r a n s

12. Train M t by minimizing Equation (3)

13. end while

14. t = t + 1

15. end while