# Review the adaptability of ML in Power System
###### tags: `Power System`
The performance of data-driven methods heavily depends on the quality of datasets. However, it is impossible to sample/synthetic datasets that cover all the situation. In optimisation problems such as Optimal Power Flow (OPF), most data-driven methods, except for graph-based methods, are trained on different system topologies respectively, which means if the topology changes, the trained model will not be applicable.
Disturbance often occurs in the power system, which leads to changes in the constraints of OPF problem. Data-driven methods should have taken disturbance within a certain range into consideration, but the essence of such methods, a black box without understanding of physical laws, may limit their generalization ability to deal with the more complex or purturbed situation. Although Physics-Informed Neural Network can alleviate this shortage, the performance still relys on the quality of the dataset.
N-1 fault seldom happens in the power system, which leads to changes in the topology. To avoid cascading N-k faults, one should respond to N-1 fault quickly so that the simulation and solution to potential N-1 fault will be conducted in advance. Under the circumstance, not only the OPF problem should be solve in various topologies, but also the transient/voltage stability and security assessment. Also, data-driven methods of these problems also suffer from the generalisation ability facing the input disturbance and computational cost of obtaining a considerate dataset.
Graph-Nerual-Network-based methods provide a feasible to utilise the topology, but tiny changes such as a N-1 fault in a large system is hard for the neural network of high complexity to capture. A large power system can be viewed as composition of small systems, so there should exist guidance information across different systems. However, few GNN methods succeed to utilise cross-topology information probably due to the learning pattern.
In addition, despite the fact that many Deep Reinforcement Learning (DRL) methods performed well on the Robustness Track of L2RPN, which trys to simulate the topology changes in power system, competitors did not get much progress on the Adaptability Track that uses dataset of different distribution (i.e. mixture of different types of energy) in training and test dataset.
Problems to further discover:
1. To which extent, current data-driven methods for OPF, stability and security assessment problems, can keep robust to disturbance.
2. How urgent is the need for solving these problems with varying topologies?
3. Any GNN methods with the cross-topology concept in other domains (i.e. Knowledge Graph, Protein)?
## Transfer Learning
**Transfer learning (TL)** is a learning pattern targeted at enhancing the generalisation ability of machine learning models (not only neural networks) with limited data. On one hand, TL can help data-driven models to solve the OPF problem and to evaluate stability under various topologies such as unseen N-1 faults. On the other hand, TL can guide the training process to generalize towards a specific direction based on the given unlabeled dataset, while keeping the accuracy in an acceptable range. This feature is useful for models to handle dataset of different distribution and deal with the input disturbance.
TL has already been used in a little amount of works in power system, and some works now foucs on the domain adaption, which is also a hot topic in the field of copmuter vision. A potential advantage to use TL in power system is that TL may provide a way to explain the performance through **Domain Adaption** and **Domain Generalisation**.
### Patterns of Transfer Learning
1. **Sufficient samples with labels in both source domain and target domain**.
This naive pattern freezes parameters of some layers trained by source domain and trains the rear layers on the target domain. An online frequency stability assessment and control[^Xie,2021] was developed using this pattern, but this pattern still costs much computational resources and the performance and efficiency is not guaranteed[^Li,2021].
2. **Sufficient samples with labels in source domain and samples without labels in target domain**.
This pattern is called **domain adaption**, which minimises the divergence between source and target domain along as an auxiliary task. Domain adaption can efficiently make use of the distribution of target domain to enhance genralization ability such as feature transformation[^Xia,2021][^Ren,2019]. Some works can also be found in power system using this pattern recently[^Lin,2021][^Ma,2021].
3. **Sufficient samples with labels in some source domains only**.
This more challenging pattern is called **domain generalisation**[^Wang,2021]. Currently this pattern is not spotted in the field of power system but it remains a hot research topic in computer vision. Domain generalisation method will output a model representing the common feature among the given source domains, which can be directly used or trained in the test samples (target domains).
*An interseting work[^Li,2020] targets at assigning features to newly-installed devices based on transfer learning. (Probably useful for network extension in micro grid?)*
Problems to further discover:
1. Summarises the techniques of DA and DG, and try to connect them to power system problems.
2. RL can also be enhanced by DA/DG[^Zhang,2017]. Look for the TL pattern in RL.
3. Look for the interpretability of TL.
---
### Verification of Neural Networks
A post process to verify the behavior of the trained neural network. A verification is composed of a model $f$, a dataset $d$ and a/some property/ies to verify $p$.
Constraint-based verification
Abstraction-based verification
A common example is the adversarial robustness of the neural network. The optimisation goal for binary classification problem is $y_1 > y_2$ and the constraints are $f$, reformulated activation functions (i.e. ReLU) and infinite-norm of input disturbance.
### Interpretability of Nerural Networks
[^Xie,2021]: Xie, Jian, and Wei Sun. [A Transfer and Deep Learning-Based Method for Online Frequency Stability Assessment and Control.](https://ieeexplore.ieee.org/abstract/document/9435326/) IEEE Access 9 (2021): 75712-75721.
[^Xia,2021]: Xia, Yang, and Yan Xu. [A transferrable data-driven method for IGBT open-circuit fault diagnosis in three-phase inverters.](https://ieeexplore.ieee.org/abstract/document/9454314/?casa_token=bhwChqXJ0L0AAAAA:Zw4udEku_kBJtMYcXx7V0v_cZm9hzGD6MvvhRJAPmv0M-RavVP7-jjQcytcAEWNPjPEohPVr) IEEE Transactions on Power Electronics 36.12 (2021): 13478-13488.
[^Lin,2021]: Lin, Jun, et al. [Deep Domain Adaptation for Non-Intrusive Load Monitoring Based on a Knowledge Transfer Learning Network.](https://ieeexplore.ieee.org/abstract/document/9548953/?casa_token=uYHbTK1WgK4AAAAA:UQdjNl2IZeGTNmpFa7-8SEZ7ERBWDD88Qd5mJWbUXTl--tFdbBrH0eWMHAIg3vqXEQDcqxyH) IEEE Transactions on Smart Grid 13.1 (2021): 280-292.
[^Ma,2021]: Ma, Xinliang, et al. [Fault Identification in Power Distribution Systems based on Domain Adaptation Probabilistic Learning.](https://ieeexplore.ieee.org/abstract/document/9541941/?casa_token=qogZNm_TxasAAAAA:viWsx-bLhj03PZSRuH-gRn60iAwjZQSRJTD9PmT-pTSMKPrKaGKQiBNxKNzwPy0taDZKRff3) 2021 Power System and Green Energy Conference (PSGEC). IEEE, 2021.
[^Li,2020]: Li, Haoran, Yang Weng, and Hanghang Tong. [Heterogeneous transfer learning on power systems: A merged multi-modal gaussian graphical model.](https://ieeexplore.ieee.org/abstract/document/9338252/?casa_token=udf3GjoBOPgAAAAA:rlbiUrWtF6ecBjBUMyMHd7Q5nVlS1vifc3kpZ1ra0TgN2y2JOH5Lwssr9VWANWxCP-Qrk6OD) 2020 IEEE International Conference on Data Mining (ICDM). IEEE, 2020.
[^Ren,2019]: Ren, Chao, and Yan Xu. [Transfer learning-based power system online dynamic security assessment: Using one model to assess many unlearned faults.](https://ieeexplore.ieee.org/abstract/document/8871201/?casa_token=JNujXNvk6r0AAAAA:ha7yOX3tTe2s1Em1C1U1VbcJH4zNY0iROOg81dVJjMl1b0knq7BB7oy9OB2lRfGi-wES091e) IEEE Transactions on Power Systems 35.1 (2019): 821-824.
[^Zhang,2017]: Zhang, Xiaoshun, et al. [Deep transfer Q-learning with virtual leader-follower for supply-demand Stackelberg game of smart grid.](https://www.sciencedirect.com/science/article/pii/S036054421730871X?casa_token=-p5j7T6abfAAAAAA:1kJqpQhDIpvJYTOHCYei0KySqNQ3sWFCvTDR81c-JSXtL5sqmzlE-5DKQMhuGGtGE8ERD2Lvzg) Energy 133 (2017): 348-365.
[^Li,2021]: Li, Zhouping, et al. [Fine Tune or not? Evaluation of Transfer Methods for Power System Transient Stability Analysis.](https://ieeexplore.ieee.org/abstract/document/9697409/?casa_token=oZKfOMkuTW8AAAAA:jFm3eZ44CzhLOMrb7cAiX4VFfSnzGP79gA5Ye1xzYArb2IFHdDkqMng56tQRmtR6lMVuaCr6) 2021 International Conference on Power System Technology (POWERCON). IEEE, 2021.
[^Wang,2021]: Wang, Jindong, et al.[Generalizing to unseen domains: A survey on domain generalization.](https://arxiv.org/abs/2103.03097) arXiv preprint arXiv:2103.03097 (2021).