A machine learning framework based on physical information: a little problem!

I found that the physical information neural network I made did not have a good prediction effect outside the training domain. How can I solve the problem

This document I reproduced:
[1] Han S , Stelz L , Stoecker H ,et al.Approaching epidemiological dynamics of COVID-19 with physics-informed neural networks[J].Journal of the Franklin Institute, 2024, 361(6).DOI:10.1016/j.jfranklin.2024.106671.

Approaching epidemiological dynamics of COVID-19 with__physics-informed neural networks.pdf (1.2 MB)

I found that the physical information neural network I made did not have a good prediction effect outside the training domain. How can I solve the problem?

Thanks for this really excellent example. Minor correction in your code. The (“Time”->1) at the bottom of the "pde’ net should be changed to (“Time” → “Scalar”) because of the input data:

Take[data,5]
{0. -> {970., 20., 0.}, 0.1 -> {969.572, 20.1854, 0.18824}, 
 0.2 -> {969.14, 20.372, 0.377969}, 
 0.3 -> {968.704, 20.5599, 0.569198}, 
 0.4 -> {968.266, 20.7491, 0.76194}}

Could you please explain why #[[1]] is used for “Sres”, “Ires” and “Rres”?

"cate1" -> CatenateLayer[],
"Sres" -> FunctionLayer[Function[{#[[1]] + \[Beta]*#[[2]]*#[[3]]/N1}]],
"cate2" -> CatenateLayer[],
"Ires" -> 
 FunctionLayer[
  Function[{#[[1]] - \[Beta]*#[[2]]*#[[3]]/N1 + \[Gamma]*#[[3]]}]],
"cate3" -> CatenateLayer[],
"Rres" -> FunctionLayer[Function[{#[[1]] - \[Gamma]* #[[2]]}]],

I thought #[[1]],#[[2]], and #[[3]] should be used instead?

"cate1" -> CatenateLayer[],
"Sres" -> FunctionLayer[Function[{#[[1]] + \[Beta]*#[[2]]*#[[3]]/N1}]],
"cate2" -> CatenateLayer[],
"Ires" -> 
 FunctionLayer[
  Function[{#[[2]] - \[Beta]*#[[2]]*#[[3]]/N1 + \[Gamma]*#[[3]]}]],
"cate3" -> CatenateLayer[],
"Rres" -> FunctionLayer[Function[{#[[3]] - \[Gamma]* #[[2]]}]],

Thanks! I modified this according to your suggestions,Sres, Ires, Rres are the loss of physical information,I think this example is more complicated and may not be easy to understand

This is the true result: