Virus propagation network topology hyperparameter identification method based on data assimilation
Patent Information
- Application Number
- CN202611219250.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-30
AI Technical Summary
对于难以由超参数快速生成、或生成过程可能失败的网络,这一做法计算开销较大且稳定性不足
[0021]1、本发明中,以宏观感染比例和恢复比例作为核心观测量,取代了对节点级状态数据的依赖。仅利用易于获取的宏观统计序列,有效降低了数据采集成本和实施难度,使拓扑辨识在数据受限场景下依然具备可行性。
Smart Images

Figure CN123020184A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of virus propagation dynamics technology, specifically a method for identifying hyperparameters of virus propagation network topology based on data assimilation. Background Technology
[0002] Virus transmission networks consist of individual or device nodes and contact or communication connections that may lead to virus transmission. Topological characteristics such as network connection patterns, average degree, and degree distribution heterogeneity significantly influence the infection spread process. In real-world scenarios, precise propagation connections between nodes are often difficult to measure directly, and the measured topological data may contain omissions and errors. In contrast, macroscopic time series data such as infection scale and recovery scale are easier to obtain through monitoring or statistics. This leads to the problem of topological inversion of virus transmission networks, where "macroscopic propagation behavior is observable, but microscopic topological structure is invisible."
[0003] Existing methods for inferring the topology of virus propagation networks largely rely on the continuous states of each node, state transition times, or responses to external disturbances, with the goal of reconstructing the adjacency matrix. When the propagation network is large, node-level data acquisition is costly and computationally intensive. Furthermore, in many risk assessment and propagation prediction scenarios, it is not necessary to reconstruct every edge; only hyperparameters characterizing the overall topology, such as edge density, node degree, or heterogeneity, are needed. Identifying topological hyperparameters using only coarse-grained macroscopic observations such as infection and recovery rates can lower the data acquisition threshold and adapt to the needs of large-scale virus propagation network analysis.
[0004] For nonlinear, stochastic virus propagation dynamics, methods such as ensemble Kalman filtering typically require simultaneous modification or regeneration of the propagation network after updating the topology hyperparameters. For networks that are difficult to generate quickly from hyperparameters, or whose generation process may fail, this approach incurs significant computational overhead and lacks stability. While standard particle filtering is suitable for nonlinear systems, its resampling mechanism continuously loses candidate hyperparameter particles during static topology hyperparameter identification, eventually causing the particle ensemble to collapse and making it difficult to maintain effective identification of the propagation network's topological characteristics.
[0005] Therefore, there is a need for an identification scheme that utilizes only macroscopic observations of virus propagation, does not require repeated network reconstruction during iteration, and avoids the loss of particle diversity in static topological hyperparameters, in order to improve the feasibility and stability of virus propagation network topology analysis in data-constrained scenarios. Summary of the Invention
[0006] The purpose of this invention is to provide a method for identifying hyperparameters of virus propagation network topology based on data assimilation in order to solve the problems mentioned above.
[0007] The technical solution adopted in this invention is as follows: a method for identifying hyperparameters of virus propagation network topology based on data assimilation, comprising the following steps:
[0008] S1: Obtain input data, including the infection and recovery rates at each moment in the macroscopic observation time series, network size, candidate topology model, infection rate and recovery rate in the propagation dynamics parameters, initial infection rate, optional initial recovery rate (0 if no initial recovery rate is provided), and particle number N.
[0009] S2: Set the prior distribution of topological hyperparameters for candidate topological models, such as the edge probability of a random graph, the node degree of a regular graph, and the preferred connection parameter or power-law exponent of a scale-free graph.
[0010] S3: Extract N hyperparameters from the prior distribution and generate corresponding virus propagation network particles. Randomly set the initial infection node, calculate the initial infection ratio and recovery ratio, set the initial weight of each particle to 1 / N, save the particle state including infection ratio, recovery ratio and hyperparameters, and save the auxiliary node state at the same time.
[0011] S4: Fix the network and hyperparameters of each particle in each observation interval, obtain the predicted infection ratio and recovery ratio according to the discretized SIR dynamics evolution, and use the observed values and predicted values to construct Gaussian likelihood to update the unnormalized weights and normalize them.
[0012] S5: Apply a preset positive lower bound to the normalization weights, such as 1 / (10N), normalize again, and do not perform resampling to maintain the diversity of static hyperparameter particles.
[0013] S6: Output the topological hyperparameter identification value and macroscopic state estimate value at the current time step according to the regularized weights. Repeat S4 and S5 until all observations are processed. Compare the observation fitting error of each candidate model and output the better model and its hyperparameters.
[0014] In a preferred embodiment, step S1 involves acquiring input data of the virus propagation system to be analyzed, including the proportion of infected nodes and the proportion of recovered nodes at each moment in the macroscopic observation time series. Simultaneously, the network size, candidate topology model, infection rate and recovery rate, initial infection ratio, and the set number of particles N are read from the propagation dynamics parameters. The infection rate and recovery rate are known parameters, predetermined by independent data. The macroscopic observation series provides a true reference for subsequent weight updates. The network size determines the total number of nodes in the particle network, and the candidate topology model indicates the network category to which the hyperparameters to be identified belong.
[0015] In a preferred embodiment, in step S2, a prior distribution of the corresponding topological hyperparameters is set for the selected candidate topological model. If the candidate model is an Erdős-Rényi random graph, a prior distribution of the range of values for the edge probabilities is set; if it is a random regular graph, a prior distribution of the node degrees is set; if it is a Barabási-Albert scale-free graph, a prior distribution of the preferred connection parameters is set; if it is a power-law network, a prior distribution of the power-law exponent of the degree distribution is set. This prior distribution reflects the possible cognitive range of topological features in the actual scenario, providing a basis for subsequent particle sampling.
[0016] In a preferred embodiment, in step S3, N topological hyperparameters are extracted from the prior distribution, and a corresponding virus propagation network particle is generated for each hyperparameter, forming a particle set. Initial infected nodes are randomly set in each particle network to satisfy a given initial infection ratio, and the initial recovery ratio is calculated. The initial weight of each particle is set to 1 / N, and the particle state is composed of the infection ratio, recovery ratio, and the corresponding topological hyperparameter. Simultaneously, the node infection state of the particle network is saved as an auxiliary state for subsequent evolution calculations of propagation dynamics.
[0017] In a preferred embodiment, in step S4, within each observation interval, the topological hyperparameters and network connections of each particle are fixed without any modification to the network. Only the node states of each particle's network are updated according to the discretized SIR virus propagation dynamics, thereby obtaining the predicted infection and recovery rates. The difference between the macroscopic observation values and the predicted values of each particle is substituted into the Gaussian observation likelihood function to calculate the likelihood value. This likelihood value is then multiplied by the particle's weight at the previous time step to obtain the unnormalized weight. Subsequently, the unnormalized weights of all particles are normalized so that the sum of the weights remains 1.
[0018] In a preferred embodiment, in step S5, the weights of each normalized particle are checked, and weights below a preset positive lower bound of 1 / (10N) are raised to that lower bound. This ensures that even poorly fitted particles retain small weights, preventing weights from dropping to zero due to finite precision calculations. After weight adjustment, all particle weights are normalized again. Throughout this process, the resampling operation in standard particle filtering is not performed, thus avoiding the loss of particles with different hyperparameters due to repeated elimination. This maintains the particle set's coverage of the topological feature space and is suitable for hyperparameter identification problems where it is difficult to quickly and stably generate a network after each update.
[0019] In a preferred embodiment, in step S6, based on the regularized weights, the infection ratio, recovery ratio, and topological hyperparameters of each particle are weighted and summed to obtain the macroscopic state estimate and topological hyperparameter identification value at the current moment. The prediction and weight update steps are repeated until all observation moments have been processed. If multiple candidate topological models exist, the complete above process is run for each model, the observation fitting errors under each model are compared, and the model with the smaller fitting error and its corresponding hyperparameter identification result are finally output. The running configuration, weighted estimates at each moment, parameter standard deviation, effective particle count, cumulative logarithmic evidence, and selected network type are saved, providing a basis for identifying the topological characteristics of the virus propagation network and predicting its propagation trend.
[0020] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0021] 1. In this invention, the macroscopic infection rate and recovery rate are used as the core observations, replacing the reliance on node-level state data. By utilizing only easily obtainable macroscopic statistical sequences, the cost of data collection and the difficulty of implementation are effectively reduced, making topology identification feasible even in data-constrained scenarios.
[0022] 2. In this invention, the topological hyperparameters are fixed and retained in the particles. The entire iterative process only evolves the propagation dynamics of the particle network, without directly modifying or regenerating the network in the update step. This avoids the computational overhead and generation failure risk caused by frequent network reconstruction in methods such as ensemble Kalman filtering, thus improving the stability and execution efficiency of the algorithm. It is especially suitable for application scenarios where it is difficult to quickly generate network structures from hyperparameters.
[0023] 3. In this invention, a non-resampled update mechanism with a weighted lower bound is used to replace the resampling operation of the standard particle filter. By setting a positive lower bound for the weights, each particle retains a certain weight, which suppresses weight degradation while maintaining particle diversity. This allows the identification results to comprehensively reflect multiple topological possibilities, enhancing the reliability and stability of the method. Attached Figure Description
[0024] Figure 1 This is a schematic diagram illustrating the process principle of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0026] Example:
[0027] Reference Figure 1A method for identifying hyperparameters of virus propagation network topology based on data assimilation includes the following steps:
[0028] S1: Obtain input data, including the infection and recovery rates at each moment in the macroscopic observation time series, network size, candidate topology model, infection rate and recovery rate in the propagation dynamics parameters, initial infection rate, optional initial recovery rate (0 if no initial recovery rate is provided), and particle number N.
[0029] S2: Set the prior distribution of topological hyperparameters for candidate topological models, such as the edge probability of a random graph, the node degree of a regular graph, and the preferred connection parameter or power-law exponent of a scale-free graph.
[0030] S3: Extract N hyperparameters from the prior distribution and generate corresponding virus propagation network particles. Randomly set the initial infection node, calculate the initial infection ratio and recovery ratio, set the initial weight of each particle to 1 / N, save the particle state including infection ratio, recovery ratio and hyperparameters, and save the auxiliary node state at the same time.
[0031] S4: Fix the network and hyperparameters of each particle in each observation interval, obtain the predicted infection ratio and recovery ratio according to the discretized SIR dynamics evolution, and use the observed values and predicted values to construct Gaussian likelihood to update the unnormalized weights and normalize them.
[0032] S5: Apply a preset positive lower bound to the normalization weights, such as 1 / (10N), normalize again, and do not perform resampling to maintain the diversity of static hyperparameter particles.
[0033] S6: Output the topological hyperparameter identification value and macroscopic state estimate value at the current time step according to the regularized weights. Repeat S4 and S5 until all observations are processed. Compare the observation fitting error of each candidate model and output the better model and its hyperparameters.
[0034] In step S1, input data for the virus transmission system to be analyzed is acquired, including the proportion of infected nodes and the proportion of recovered nodes at each time point in the macroscopic observation time series. Simultaneously, the network size, candidate topology model, infection rate and recovery rate, initial infection ratio, and the set number of particles N are read. The infection rate and recovery rate are known parameters, predetermined by independent data. The macroscopic observation series provides a true reference for subsequent weight updates. The network size determines the total number of nodes in the particle network, and the candidate topology model indicates the network category to which the hyperparameters to be identified belong.
[0035] In step S2, for the selected candidate topology model, a prior distribution of the corresponding topological hyperparameters is set. If the candidate model is an Erdős-Rényi random graph, a prior distribution of the range of values for the edge probabilities is set; if it is a random regular graph, a prior distribution of the node degrees is set; if it is a Barabási-Albert scale-free graph, a prior distribution of the preferred connection parameters is set; if it is a power-law network, a prior distribution of the power-law exponent of the degree distribution is set. This prior distribution reflects the possible cognitive range of topological features in the actual scene, providing a basis for subsequent particle sampling.
[0036] In step S3, N topological hyperparameters are extracted from the prior distribution. For each hyperparameter, a corresponding virus propagation network particle is generated, forming a particle set. Initial infected nodes are randomly set in each particle network to satisfy a given initial infection ratio, and the initial recovery ratio is calculated. The initial weight of each particle is set to 1 / N. The particle state is composed of the infection ratio, recovery ratio, and the corresponding topological hyperparameter. Simultaneously, the node infection state of the particle network is saved as an auxiliary state for subsequent evolution calculations of propagation dynamics.
[0037] In step S4, within each observation interval, the topological hyperparameters and network connections of each particle are fixed without any modification to the network. Only the node states of each particle's network are updated according to the discretized SIR virus propagation dynamics to obtain the predicted infection and recovery rates. The difference between the macroscopic observations and the predicted values of each particle is substituted into the Gaussian observation likelihood function to calculate the likelihood value. This likelihood value is then multiplied by the particle's weight from the previous time step to obtain the unnormalized weight. Subsequently, the unnormalized weights of all particles are normalized so that the sum of the weights remains 1.
[0038] In step S5, the weights of each normalized particle are checked, and weights below a preset positive lower bound of 1 / (10N) are raised to that lower bound. This ensures that even poorly fitted particles retain small weights, preventing weights from dropping to zero due to finite precision calculations. After weight adjustment, all particle weights are normalized again. Throughout this process, the resampling operation in standard particle filtering is not performed, thus avoiding the loss of particles with different hyperparameters due to repeated elimination. This maintains the particle set's coverage of the topological feature space and is suitable for hyperparameter identification problems where it is difficult to quickly and stably generate a network after each update.
[0039] In step S6, based on the regularized weights, the infection rate, recovery rate, and topological hyperparameters of each particle are weighted and summed to obtain the macroscopic state estimate and topological hyperparameter identification value at the current moment. The prediction and weight update steps are repeated until all observation moments have been processed. If multiple candidate topological models exist, the complete process described above is run for each model, and the observation fitting errors under each model are compared. Finally, the model with the smaller fitting error and its corresponding hyperparameter identification results are output, and the running configuration, weighted estimates at each moment, parameter standard deviation, effective particle count, cumulative logarithmic evidence, and selected network type are saved, providing a basis for identifying the topological characteristics of the virus transmission network and predicting its propagation trend.
[0040] As can be seen from the above, this method uses macroscopic infection and recovery rates as core observations, replacing the reliance on node-level state data. Traditional methods require collecting continuous states or state transition times for each node, which is difficult to achieve in real-world large-scale propagation networks. In contrast, this invention utilizes readily available macroscopic statistical sequences, effectively reducing data collection costs and implementation difficulty, making topology identification feasible even in data-constrained scenarios.
[0041] This method retains the topological hyperparameters within the particles, and the entire iterative process only evolves the propagation dynamics of the particle network, without directly modifying or regenerating the network in the update steps. This approach avoids the computational overhead and generation failure risk caused by frequent network reconstruction in methods such as ensemble Kalman filtering, improving the stability and execution efficiency of the algorithm, and is particularly suitable for application scenarios where it is difficult to quickly generate network structures from hyperparameters.
[0042] This method replaces the resampling operation of standard particle filtering with a weighted lower bound non-resampling update mechanism. Standard resampling causes static hyperparameter particles to be repeatedly eliminated due to their weights returning to zero, eventually leading to particle ensemble collapse and loss of coverage of the topological feature space. This invention ensures that each particle retains a certain weight by setting a positive lower bound on the weights, thus suppressing weight degradation while maintaining particle diversity. This allows the identification results to comprehensively reflect multiple topological possibilities, enhancing the reliability and stability of the method.
[0043] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0044] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying hyperparameters of virus propagation network topology based on data assimilation, characterized in that: Includes the following steps: S1: Obtain input data, including the infection and recovery rates at each moment in the macroscopic observation time series, network size, candidate topology model, infection rate and recovery rate in the propagation dynamics parameters, initial infection rate, optional initial recovery rate (0 if no initial recovery rate is provided), and the number of particles N; S2: Set the prior distribution of topological hyperparameters for candidate topological models, such as the edge probability of a random graph, the node degree of a regular graph, and the preferred connection parameter or power-law exponent of a scale-free graph. S3: Extract N hyperparameters from the prior distribution and generate corresponding virus propagation network particles. Randomly set the initial infection node, calculate the initial infection ratio and recovery ratio, set the initial weight of each particle to 1 / N, save the particle state including infection ratio, recovery ratio and hyperparameters, and save the auxiliary node state at the same time. S4: Fix the network and hyperparameters of each particle in each observation interval, obtain the predicted infection ratio and recovery ratio according to the discretized SIR dynamics evolution, and use the observed values and predicted values to construct Gaussian likelihood to update the unnormalized weights and normalize them. S5: Apply a preset positive lower bound to the normalization weights, normalize again, and do not perform resampling to maintain the diversity of static hyperparameter particles; S6: Output the topological hyperparameter identification value and macroscopic state estimate value at the current time step according to the regularized weights. Repeat S4 and S5 until all observations are processed. Compare the observation fitting error of each candidate model and output the better model and its hyperparameters.
2. The method for identifying hyperparameters of virus propagation network topology based on data assimilation according to claim 1, characterized in that: In step S1, the input data of the virus transmission system to be analyzed is obtained, including the proportion of infected nodes and the proportion of recovered nodes at each moment in the macroscopic observation time series. At the same time, the network size, candidate topology model, infection rate and recovery rate, initial infection ratio and set number of particles N in the transmission dynamics parameters are read.
3. The method for identifying hyperparameters of virus propagation network topology based on data assimilation according to claim 1, characterized in that: In step S2, for the selected candidate topology model, a prior distribution of the corresponding topology hyperparameters is set; if the candidate model is an Erdős-Rényi random graph, a prior distribution of the range of values for the edge probability is set; if it is a random regular graph, a prior distribution of the node degree is set; if it is a Barabási-Albert scale-free graph, a prior distribution of the preferred connection parameter is set; if it is a power-law network, a prior distribution of the power-law exponent of the degree distribution is set.
4. The method for identifying hyperparameters of virus propagation network topology based on data assimilation according to claim 1, characterized in that: In step S3, N topological hyperparameters are extracted from the prior distribution, and a corresponding virus propagation network particle is generated for each hyperparameter to form a particle set. An initial infected node is randomly set in each particle network to meet the given initial infection ratio, and the initial recovery ratio is calculated. The initial weight of each particle is set to 1 / N, and the particle state is composed of the infection ratio, the recovery ratio and the corresponding topological hyperparameter.
5. The method for identifying hyperparameters of virus propagation network topology based on data assimilation according to claim 1, characterized in that: In step S4, within each observation interval, the topological hyperparameters and network connections of each particle are fixed without any modification to the network. Only the node states of each particle network are updated according to the discretized SIR virus propagation dynamics to obtain the predicted infection and recovery rates. The difference between the macroscopic observation values and the predicted values of each particle is substituted into the Gaussian observation likelihood function to calculate the likelihood value. Then, the likelihood value is multiplied by the weight of the particle at the previous moment to obtain the unnormalized weight. Subsequently, the unnormalized weights of all particles are normalized so that the sum of the weights remains at 1.
6. The method for identifying hyperparameters of virus propagation network topology based on data assimilation according to claim 1, characterized in that: In step S5, the weights of each normalized particle are checked, and the weights below the preset positive lower bound 1 / (10N) are raised to the lower bound to ensure that even particles with poor fit retain small weights and avoid weights returning to zero due to finite precision calculations; after the weights are adjusted, all particle weights are normalized again.
7. The method for identifying hyperparameters of virus propagation network topology based on data assimilation according to claim 1, characterized in that: In step S6, based on the regularized weights, the infection ratio, recovery ratio, and topological hyperparameters of each particle are weighted and summed to obtain the macroscopic state estimate and topological hyperparameter identification value at the current moment. The prediction and weight update steps are repeated until all observation moments are processed. If there are multiple candidate topological models, the above complete process is run for each model, the observation fitting error under each model is compared, and finally the model with the smaller fitting error and its corresponding hyperparameter identification result are output.