WO2021219080A1 - Federated learning model-based view display method, apparatus and device, and medium - Google Patents

Federated learning model-based view display method, apparatus and device, and medium Download PDF

Info

Publication number
WO2021219080A1
WO2021219080A1 PCT/CN2021/090983 CN2021090983W WO2021219080A1 WO 2021219080 A1 WO2021219080 A1 WO 2021219080A1 CN 2021090983 W CN2021090983 W CN 2021090983W WO 2021219080 A1 WO2021219080 A1 WO 2021219080A1
Authority
WO
WIPO (PCT)
Prior art keywords
learning model
federated learning
view
view display
horizontal
Prior art date
Application number
PCT/CN2021/090983
Other languages
French (fr)
Chinese (zh)
Inventor
李�权
魏锡光
林焕彬
陈天健
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2021219080A1 publication Critical patent/WO2021219080A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/323Visualisation of programs or trace data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/40Software arrangements specially adapted for pattern recognition, e.g. user interfaces or toolboxes therefor

Definitions

  • This application relates to the field of federated learning technology of Fintech, and in particular to a view display method, device, device and medium based on a federated learning model.
  • the main purpose of this application is to provide a view display method, device, device, and medium based on a federated learning model, which aims to solve the problem of low success rate in the process of training a horizontal federated learning model and the horizontal federated learning obtained from training.
  • the model identifies the technical problem of low accuracy of the data.
  • the view display method based on a federated learning model includes the following steps:
  • the content displayed in the visual view is determined according to the training process.
  • the present application also provides a view display device based on a federated learning model, and the view display device based on a federated learning model includes:
  • An obtaining module which is used to obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model;
  • the determining module is used for determining the training process of the horizontal federated learning model; and determining the content displayed in the visual view according to the training process.
  • the present application also provides a view display device based on a federated learning model.
  • the view display device based on a federated learning model includes a memory, a processor, and a memory, a processor, and a memory that is stored in the memory and can be processed in the process.
  • a view display program based on a federated learning model running on the processor and when the view display program based on a federated learning model is executed by the processor, the steps of a view display method based on a federated learning model corresponding to the federated learning server are implemented.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a view display program based on a federated learning model, and the view display program based on a federated learning model is processed When the processor is executed, the steps of the view display method based on the federated learning model as described above are implemented.
  • This application obtains the operating data of the horizontal federated learning model corresponding to each client during the iterative training process of the horizontal federated learning model, constructs a visual view corresponding to the horizontal federated learning model according to the running data, and determines the training process of the horizontal federated learning model, Control the content displayed in the visual view according to the training progress.
  • the content displayed in the visual view is used to determine the training process data corresponding to the iterative training of the horizontal federated learning model.
  • the training process data is used to determine various influencing factors in the iterative training process to avoid malicious information in the client data. The potential risks of, cause unexpected results to the federated learning server, thereby increasing the success rate of horizontal federated learning model training, and the accuracy of the recognition data of the trained horizontal federated learning model.
  • FIG. 1 is a schematic flowchart of a first embodiment of a view display method based on a federated learning model in this application;
  • Figure 2 is a schematic diagram of an overview view in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the visualized loss value, recognition accuracy, and number of training samples in an embodiment of the present application
  • Fig. 4 is a schematic diagram of a projection view in an embodiment of the present application.
  • Fig. 5 is a schematic diagram of a contribution ranking view in an embodiment of the present application.
  • Fig. 6 is a functional schematic block diagram of a preferred embodiment of a view display device based on a federated learning model of the present application
  • Fig. 7 is a schematic structural diagram of a hardware operating environment involved in a solution of an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a first embodiment of a view display method based on a federated learning model of this application.
  • the embodiment of this application provides an embodiment of the view display method based on the federated learning model. It should be noted that although the logical sequence is shown in the flowchart, in some cases, it can be executed in a different order than here. Steps shown or described.
  • View display method based on the federated learning model is applied to the federated learning server.
  • the execution subject is omitted to describe the various embodiments.
  • View display methods based on the federated learning model include:
  • Step S10 Obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model.
  • the horizontal federated learning model is obtained according to the built instruction during the iterative training process of the horizontal federated learning model, and the horizontal federated learning model corresponds to the running data of each client.
  • the construction instruction can be triggered by the user according to specific needs, and can also be triggered when the horizontal federated learning model starts to be constructed, that is, the construction instruction is automatically triggered when the horizontal federated learning model is iteratively trained for the first time.
  • Each client has corresponding operating data.
  • the operating data includes at least one of the following: client identification, client name, start timestamp when the horizontal federated learning model starts iterative training, client The training times of the local model, the corresponding loss value of the local model after each iterative training, the recognition accuracy of the data recognition of the local model after each iterative training, the start time and end of each training of the local model by the client through the local data Point in time.
  • the local model is a model that the federated learning server sends to each client after obtaining the horizontal federated learning model, and each client stores the model. After each client receives the horizontal federated learning model, it uses the received horizontal federated learning model as its own local model, and may use its own local data to adjust the local model. It is understandable that the operating data will not involve the private data of each client user.
  • the client ID is used to uniquely indicate a certain client.
  • the client ID and client name can be transmitted together; the start timestamp of each time the horizontal federated learning model starts iterative training can be Obtained by a timer when starting iterative training; the training times of the client's local model can be sent to the federated learning server during each iteration of the training process.
  • the training times can be equal to the number of iterations or not equal to the number of iterations ;Each iteration of training can get the corresponding loss value; recognition accuracy can obtain the preset data to be tested after each iteration of training to obtain the local model, and input the data to be tested into the local model to obtain the horizontal local model The output result is compared with the correct result corresponding to the data to be tested to determine the recognition accuracy.
  • Step S20 Construct a visual view corresponding to the horizontal federated learning model according to the operating data, and determine the training process of the horizontal federated learning model.
  • a visual view corresponding to the horizontal federated learning model is constructed based on the running data, and the training process of the horizontal federated learning model is determined.
  • the visual view includes at least one of the following: overview view, summary view, projection view, comparison view, and contribution ranking view.
  • the overview view can display the overall running process of each client during the iterative training process of the horizontal federated learning model;
  • the projection view can display the mapping relationship between the client ID and the two-dimensional distribution of each iteration of the training;
  • the summary view is used to display the statistical information corresponding to various data during the iterative training process of the horizontal federated learning model;
  • the comparison view is used to display the horizontal During the iterative training process of the federated learning model, the comparison of the corresponding indicator data of any two clients;
  • the contribution ranking view is used to display the contribution of each client to the horizontal federated learning model in different dimensions.
  • the training process of the horizontal federated learning model can be represented by the number of iterations of the horizontal federated learning model for iterative training.
  • the training process of the horizontal federated learning model can be determined by the number of iterations. Specifically, in the iterative training process of the horizontal federated learning model, the number of iterations of the horizontal federated learning model is calculated by a timer.
  • Each iteration of the horizontal federated learning model is trained, the value corresponding to the timer is increased by 1, so as to determine the horizontal federated learning model when needed.
  • the value corresponding to the timer is obtained, and the number of iterations of the horizontal federated learning is determined according to the value, thereby determining the training process of the horizontal federated learning model.
  • the operating data includes at least one of the following: client identification, the start timestamp of each iteration of training, the number of training samples corresponding to the client, the loss value corresponding to the local model, and the local model trained by each client through the local data
  • the visual view includes an overview view; the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
  • Step a Perform visual coding on the operating data to obtain visualized operating data.
  • the position of each client in the horizontal federated learning network is determined during each iteration of the training process.
  • the client identifier and the start timestamp of the current iteration training can be used to determine that the corresponding client is in the horizontal federated learning network.
  • the location in the network specifically, the location of each client in the horizontal federated learning network during each iteration of training can be preset, and the mapping relationship between the client ID, the start timestamp, and the location ID can be established in advance.
  • the position of the corresponding client in the horizontal federated learning network can be determined through the start timestamp, the client identification and the mapping relationship.
  • a box-and-whisker graph is used to represent the identification accuracy and loss value distribution of each client during each iteration training process, and a curve is used to connect the average value of the identification accuracy and loss value during each iteration training process to obtain visualization
  • the box and whisker chart is a statistical chart used to display a set of data dispersion information. Visualize the number of training samples corresponding to each client during each iteration of the training process as a curve to obtain the number of training samples after visualization.
  • the total number of training samples it can be understood that the total number of training samples is equal to the sum of the number of training samples corresponding to each client.
  • the start time point and end time point of training the local model through the client's local data can be calculated to obtain the training time of each training local model of the corresponding client.
  • the slope of the connection between the start time point and the end time point represents the training of each client Time length, so as to get the end time point and start time point after visualization.
  • Figure 3 is a schematic diagram of the visualized loss value, recognition accuracy, and the number of training samples in an embodiment of the present application.
  • the loss value of (loss) the second picture shows the recognition accuracy (Accuracy) after visualization
  • the third picture shows the number of training samples after visualization (Sampie Number).
  • Step b Construct an overview view corresponding to the horizontal federated learning model according to the visualized operating data.
  • an overview view corresponding to the horizontal federated learning model is constructed based on the visualized operating data. It is understandable that the overview view is composed of various visualized operating data. Through the overview view, the operating conditions of each client during the iterative training process of the horizontal federated learning model can be determined.
  • the clients participating in the iterative training of the horizontal federated learning model change with the evolution of the iterative training process.
  • the changes in the federated learning network can be seen through the overview view.
  • the overview view it can be determined that in each iteration of the training process, the number of samples provided by each client participating in the iterative training is generally evenly distributed, that is, each client The difference between the number of samples provided is within a preset range, which can be set according to specific needs; through the overview view, you can also determine the start time point and end time point for each client to train the local model It is understandable that the start time of the local model training of each client may be different, which may be caused by network delays.
  • the training time for each client to train the local model is also different. It is understandable that the training duration for each client to train the local model is determined through the overview view, and the start time of the next iteration training is adjusted according to the training duration, that is, the waiting time between two adjacent iteration training is adjusted to Better adapt to the training duration of each client. It is understandable that the waiting time should be greater than or equal to the maximum training time corresponding to the client. Specifically, through the overview view, it can be determined that as the number of iterations increases, the loss value is continuously reduced and the recognition accuracy is continuously improved. Furthermore, through the overview view, it is also possible to determine which iterations of training correspond to a larger change in recognition accuracy, and which iterations of training correspond to a relatively small change in recognition accuracy.
  • FIG. 2 is a schematic diagram of an overview view in an embodiment of the present application.
  • each rounded rectangular box represents an iterative training
  • a small circle in each rounded rectangular box Indicates the client participating in the current iterative training.
  • the number of iterations is aligned in the y (vertical axis) direction.
  • the order in which the clients appear; the coordinates in the x (horizontal axis) direction in Figure 2 have been adjusted so that the lines in Figure 2 will not cross, in order to minimize the overall space utilization.
  • the small solid circles in Figure 2 represent clients that only participate in part of the iterative training. It can be seen from Figure 2 that the overview view visualizes the clients involved in each iteration of the training process.
  • Step S30 Determine the content displayed in the visual view according to the training process.
  • the content displayed in the visual view is controlled according to the training process to determine the training process data of the iterative training of the horizontal federated learning model through the content displayed in the visual view.
  • the training process data obtained from different visual views is also different.
  • the training process data corresponding to the overview view is the additional operating data of each client during the iterative training process of the horizontal federated learning model.
  • a form of expression As the training process of the horizontal federated learning model changes, the model parameters of the horizontal federated learning model will change, and the running data of the client will also change. Therefore, the content displayed in the corresponding visual view is different.
  • this embodiment can determine whether each client has an abnormal condition according to the content displayed in the corresponding visual view of each client. For example, there is a big difference between the visual view of one client and the visual view of other clients. It can be determined that there may be an abnormal situation in the client.
  • the training process to control the content displayed in the visual view.
  • the content displayed in the visual view is used to determine the training process data corresponding to the iterative training of the horizontal federated learning model.
  • the training process data is used to determine various influencing factors in the iterative training process to avoid malicious information in the client data. The potential risks of, cause unexpected results to the federated learning server, thereby increasing the success rate of horizontal federated learning model training, and the accuracy of the recognition data of the trained horizontal federated learning model.
  • federated learning server is a data distribution that can be continuously updated to adapt to possible changes.
  • the federated learning server maintainers, they only rely on some simple logs and metrics to interpret the information at a given stage or moment. It is not enough to require quick and informed decisions in a short period of time. Therefore, there is an urgent need for a method that can effectively express the "temporal and spatial data" from different clients over time. Achieving this is helpful for phased adjustment of the federated learning aggregation strategy, and timely review of the iterative training process of the horizontal federated learning model in order to intervene more effectively.
  • the content displayed in the visual view is controlled according to the training process to determine the training process data corresponding to the iterative training of the horizontal federated learning model through the content displayed in the visible view, which changes as the training process of the horizontal federated learning model changes.
  • the content displayed in the visual view is used to express the changes in the iterative training process of the horizontal federated learning model corresponding to the client through the visual view, so that relevant operation and maintenance personnel can review the iterative training process of the horizontal federated learning model in a timely manner, so as to be more effective Intervene to optimize the horizontal federated learning model obtained from training.
  • a second embodiment of the view display method based on the federated learning model of this application is proposed.
  • the difference between the second embodiment of the view display method based on the federated learning model and the first embodiment of the view display method based on the federated learning model is that the visual view includes a projection view, and the construction is based on the operating data.
  • the steps of the visual view corresponding to the horizontal federated learning model include:
  • Step c Determine indicator data corresponding to each client terminal according to the operating data.
  • the indicator data corresponding to each client terminal is determined according to the operating data.
  • the running data can also include the gradient histogram corresponding to the local model and the weight histogram corresponding to the local model.
  • the model corresponds to the gradient of the model parameters, so that the corresponding gradient histogram can be obtained according to the determined gradient.
  • the weight is the weight corresponding to each model parameter in the local model.
  • the index data includes at least one of the following: loss value, recognition accuracy, training evolution number, weight histogram and gradient value histogram.
  • Step d Construct a projection view corresponding to the horizontal federated learning model according to the indicator data, wherein each node in the projection view respectively represents a mapping relationship between a client identifier and the number of iterations.
  • the projection view corresponding to the horizontal federated learning model is constructed based on the t-SNE (t-distributed stochastic neighbor embedding, t-distributed stochastic neighbor embedding) projection.
  • the projection view is a 2D (two-dimensional) view
  • t-SNE is a dimensionality reduction technique used to create low-dimensional representations and retain local similarity to convey neighborhood structure.
  • PCA Principal Component Analysis
  • MDS multidimensional scaling o, multidimensional scaling analysis
  • the projection view you can view the potential clusters and outliers in the iterative training process of the horizontal federated learning model, so as to determine the abnormal clients during the iterative training of the horizontal federated learning model.
  • each node represents a bunch of mapping relationships between "client identification-number of iterations", that is, in this embodiment, "client identification-number of iterations” is projected onto a two-dimensional view. middle.
  • the corresponding projection views are different for different iteration times.
  • the federated learning server is a special client in the projection view.
  • the federated learning server corresponding to the first iterative training is used as the starting point of the projection view, and the federated learning server corresponding to the last iterative training is used as the end point of the projection view.
  • the nodes appearing in the middle are the clients involved in the iterative training process. Then all the nodes are connected, so that through the projection view, the evolution process of the client can be determined in the iterative training process of the horizontal federated learning model.
  • FIG. 4 is a schematic diagram of a projection view in an embodiment of the present application.
  • the two small solid circles before and after the connection represent the first iterative training and the last iterative training of the horizontal federated learning model.
  • the hollow small circles in the middle of the connection represent the clients of each client participating in the horizontal federated learning model.
  • the mapping relationship between the identifier and the number of iterations For example, a certain client identifier is A and the number of iterations is the 10th time.
  • a small hollow circle represents "A-10".
  • a small circle deviates far from the curve, it means that the small circle corresponds to the client's contribution to the iterative training process of the horizontal federated learning model, and it is more likely to be an abnormal client.
  • the client corresponding to the small circle is determined to be an abnormal client.
  • the visual view includes a summary view
  • the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
  • Step e Determine statistical data corresponding to the operating data, where the statistical data includes at least one of the following: the number of clients corresponding to the horizontal federated learning model, the number of iterations, and the waiting time for training the horizontal federated learning model. The number of changes in the number of training samples, the reduction value corresponding to the loss value corresponding to the horizontal federated learning model, and the increase value of the recognition accuracy of the local model corresponding to each client;
  • Step f Construct a summary view corresponding to the horizontal federated learning model according to the statistical data.
  • the horizontal federated learning model corresponds to the number of clients of the client and the number of iterations.
  • the second iterative training corresponds to the difference in the number of samples to be trained.
  • the difference in data is equal to the number of samples to be trained in the next iterative training minus the number of samples to be trained in the previous iterative training; the reduced value is two adjacent ones.
  • the loss difference is equal to the loss value corresponding to the previous iteration training minus the loss value corresponding to the next iteration training.
  • the loss value of the local model is also learned by the horizontal federation Calculated by the model, in the same iterative training process, the loss value corresponding to the local model is equal to the loss value corresponding to the horizontal federated learning model; the increase value is equal to the recognition accuracy of the local model corresponding to the last iteration training minus the corresponding one of the previous iteration training The recognition accuracy of the local model.
  • a summary view corresponding to the horizontal federated learning model is constructed based on the statistical data, where the summary view can display the statistical data in the form of a table or a graph.
  • step f includes:
  • Step f1 According to the statistical data, the number of iterations corresponding to the horizontal federated learning model is taken as the abscissa, and the corresponding statistical data is taken as the ordinate to construct a summary view of each statistical data corresponding to the horizontal federated learning model.
  • the number of iterations corresponding to the horizontal federated learning model may be the abscissa
  • the corresponding statistical data may be the ordinate to construct a summary view of each statistical data corresponding to the horizontal federated learning model.
  • the number of iterations is used as the abscissa
  • the number of clients participating in the iterative training is the ordinate during each iteration training process
  • the summary view corresponding to the number of clients is constructed. View, you can see the changes in the number of clients in the iterative training that has been carried out.
  • this embodiment can construct summary views corresponding to the number of clients, the number of changes in the number of samples to be trained, the decrease value corresponding to the loss value, and the increase value of the recognition accuracy.
  • the visual view includes a comparison view
  • the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
  • Step g Determine the index data corresponding to each client according to the operating data, and determine the target index corresponding to the last iterative training of the horizontal federated learning model in the index data.
  • the indicator data corresponding to each client terminal is determined according to the operating data, where the indicator data indicator includes at least one of the following: recognition accuracy, loss value, The training times, weight histogram and gradient histogram of the local model.
  • the indicator data is part of the operating data.
  • the comparison view is at least constructed from indicator data between the two clients. After determining the index data, determine the target index corresponding to the last iterative training of the horizontal federated learning model in the index data.
  • the target index is the comparison benchmark in the comparison view, that is, the target index is used to compare the relevant data of the two clients. It can be understood that there is at least one target indicator.
  • the weight histogram and the gradient histogram can be set as the target indicators.
  • Step h Construct a comparison view corresponding to the horizontal federated learning model according to the target index.
  • the comparison view corresponding to the horizontal federated learning model is constructed according to the target index. Specifically, by comparing the views, it is possible to obtain the weight histogram and gradient histogram corresponding to each client in each iteration number, and then combine the weight histogram and the weight histogram between at least two clients with the same iteration number or different iteration numbers.
  • the gradient histogram is compared to obtain the similarity between the weight histogram and the gradient histogram between at least two clients, and the similarity is used as a new indicator value, that is, the weight histogram and the gradient histogram are converted Therefore, in the iterative training process, the indicator data corresponding to each client can be converted into a numerical value, which is convenient for users to analyze each client in the iterative training process.
  • step h includes:
  • Step h1 Obtain target indicators corresponding to neighboring clients in the federated learning network structure in the same iterative training process, and construct a corresponding comparison view according to the target indicators corresponding to the neighboring clients.
  • each iteration of the training process can be compared, the target indicators corresponding to neighboring clients in the federated learning network structure, and then the client name or client identifier of the neighboring client as the abscissa,
  • the target indicator corresponding to the neighboring client terminal is used as the ordinate to construct a comparison view corresponding to the neighboring client terminal.
  • the rectangle in each row represents a client
  • the bars in different colors in the rectangle represent the values corresponding to each indicator data of the client
  • the same indicator data bar corresponding to different clients The starting point of the shape is the same, so that the similarity between each indicator data can be determined by the ending point of the bar.
  • the top row in the comparison view can be used to represent the federated learning server. Further, it is also possible to obtain comparison views corresponding to different iteration times, and then display the comparison views corresponding to different iteration times in the same interface, so as to view the arrangement of the same client in different iteration times through the comparison views corresponding to the different iteration times Condition.
  • the order of the index data corresponding to each client in the comparison view can be determined as needed. If there is recognition accuracy At the time, the clients can be sorted according to the recognition accuracy from large to small to obtain a comparison view, so that the recognition accuracy corresponding to each client in the current iterative training process can be viewed through the comparison view.
  • the target indicators of various indicator data are selected, and the similarity between the indicator data of each client and the corresponding target indicator is calculated.
  • the greater the similarity the greater the The higher the ranking in the comparison view, the lower the similarity, and the lower the ranking in the comparison view.
  • Euclidean distance or cosine distance may be used to calculate the similarity between the index data of each client and the corresponding target index.
  • the similarity can be represented by a curve.
  • the calculated similarity is greater than the preset similarity, it means that the corresponding client has undergone major changes during the iterative training process of the horizontal federated learning model; if the calculated similarity is less than or equal to the preset similarity Degree means that the corresponding client is a normal change during the iterative training process of the horizontal federated learning model.
  • the preset similarity can be set according to specific needs, and this embodiment does not limit the preset similarity.
  • the comparison view it can be determined that during the iterative training process, compared with other normal fluctuation clients, there are clients with obvious fluctuations. At this time, you can select the clients with obvious fluctuations and the clients in the comparison view through operation instructions.
  • the nodes corresponding to the clients with normal fluctuations are compared, and the two clients are compared to see the difference between the loss value and recognition accuracy of the two clients and the difference between the running data such as the recognition accuracy, so as to determine the clients with obvious fluctuations.
  • the two clients are compared to see the difference between the loss value and recognition accuracy of the two clients and the difference between the running data such as the recognition accuracy, so as to determine the clients with obvious fluctuations.
  • the gradient change of each client deviates from the normal situation. It can be seen that by comparing the views, we can determine the abnormal clients in the iterative training process of the horizontal federated learning model.
  • the visual view includes a contribution ranking view
  • the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
  • Step i Determine the ranking order of the running data of the client in each iteration of the training.
  • Step j Display the ranking training in the form of a box-and-whisker graph to construct a ranking view of contribution degrees corresponding to the horizontal federated learning model.
  • the ranking order of the running data of each client during each iteration of the training process is determined.
  • the ranking order is displayed in the form of a box and whisker diagram to construct a ranking view of the contribution degree corresponding to the horizontal federated learning model. It should be noted that in the contribution degree In the sorting view, you can sort from smallest to largest according to the ranking order, or from largest to smallest according to the ranking order. Specifically, in the contribution ranking view, the clients can be sorted according to the lowest ranking, highest ranking, median ranking, and number of iterations of each client.
  • a certain client is Several running data ranks the highest, several running data ranks the lowest, and several running data ranks in the middle. It should be noted that a client does not necessarily participate in all iterations of the horizontal federated learning model. For example, the total number of iterations of the horizontal federated learning model is 100, and a client may only participate in 65 of them.
  • the client has the highest ranking during a certain iterative training process, it can be determined that the client has the highest ranking once in the current iterative training process. It is understandable that for the same operating data, the corresponding contribution can be determined according to the ranking order. For example, if a certain operating data ranks the highest, it can be determined according to the nature of the operating data that the operating data has the largest contribution to the horizontal federated learning model Or the smallest.
  • the ranking in the comparison view will also affect the ranking of the contribution ranking view. For example, when selecting the loss value in the comparison view for sorting, each client will get a ranking according to the loss value in each round, so that each client has a ranking in each round, using box-and-whisker plots Indicates the ranking distribution of this client, displayed in the contribution ranking view. At this time, the attribute selected by the user displayed in the contribution ranking view is the contribution ranking when the loss value is lost.
  • the contribution ranking view uses the box-and-whisker chart design to display the participation of all clients in the iterative training process of the horizontal federated learning model, and is sorted in descending or ascending order. Just like in joint learning, the local data of the client is completely invisible to the federated learning server. Through the ranking of different running data, the contribution of the client to the horizontal federated learning model can be understood. Among them, the loss rate and recognition accuracy may reflect the quality of each client's training data, the amount of training data represents the contribution of the data, and the loss rate indicates that the useless sample data in the sample data to be trained provided by the client accounts for the total waiting time provided by it. The proportion of training sample data.
  • Fig. 5 is a schematic diagram of a contribution ranking view in an embodiment of the present application.
  • the y (vertical) axis is the client identification of the client
  • the x (horizontal) axis is the ranking distribution.
  • Figure 5 shows the ranking distribution of the minimum running data of each client during each iteration of the training process. It can be seen from Figure 5 that the longer the length of the rectangular box corresponding to each client, the more the minimum values exist in the iterative training process of the horizontal federated learning model in its running data.
  • Turbofan tycoon or Fate-Board can be used to convey the advantages of the federated learning model.
  • Turbofan Visual analysis tools such as tycoon or Fate-Board help to promote the analysis and improvement of the federated learning model by summarizing the logs and performance index data generated by the federated learning process.
  • in-depth analysis is lacking. Fine-grained analysis such as analysis of potential client anomalies and contribution evaluation is challenging. For example, in the training process of horizontal federated learning models, the design of privacy protection mechanisms will hinder many basic operations. .
  • a third embodiment of the view display method based on the federated learning model of this application is proposed.
  • the difference between the third embodiment of the view display method based on the federated learning model and the first and/or the second embodiment of the view display method based on the federated learning model is that the view display method based on the federated learning model further includes :
  • Step k detecting whether an operation instruction to operate the visual view is received.
  • the step of determining the content displayed in the visual view according to the training process includes:
  • Step 1 Determine the content displayed in the visual view according to the operation instruction and the training process.
  • the visual view After the visual view is created, it is detected whether an operation instruction for operating the visual view is received, where the operation instruction is set out by the user according to specific needs. After receiving the operation instruction, control the content displayed in the visual view according to the operation instruction and the training process; when the operation instruction is not received, continue to detect whether an operation instruction to operate the visual view is received.
  • the user can select a node in the projection view by operating instructions, and then the summary view, overview view, comparison view, and contribution ranking view will display the relevant data corresponding to the selected node in the current training process;
  • the corresponding comparison view is trained for the second iteration, and there are multiple client running data in each comparison view, when a client is selected in one of the comparison views, that is, a customer is clicked in one of the comparison views
  • the relevant data corresponding to the client will be displayed in other comparison views. For example, the relevant data corresponding to the client in the other comparison views will be highlighted.
  • the embodiment of the present application can determine the overall operating status of each client during the iterative training process of the horizontal federated learning model and the overall operating status of each client through visual views such as summary view, projection view, overview view, comparison view, and contribution ranking view.
  • visual views such as summary view, projection view, overview view, comparison view, and contribution ranking view.
  • the present application also provides a view display device based on a federated learning model.
  • the view display device based on a federated learning model includes:
  • the obtaining module 10 is configured to obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model;
  • the construction module 20 is configured to construct a visual view corresponding to the horizontal federated learning model according to the operating data
  • the determining module 30 is configured to determine the training process of the horizontal federated learning model; and determine the content displayed in the visual view according to the training process.
  • the operating data includes at least one of the following: client identification, the start timestamp of each iteration of training, the number of training samples corresponding to the client, the loss value corresponding to the local model, and the local model trained by each client through local data
  • client identification the start timestamp of each iteration of training
  • the number of training samples corresponding to the client the number of training samples corresponding to the client
  • the loss value corresponding to the local model the local model trained by each client through local data
  • the start time point and the end time point of, the visual view includes an overview view;
  • the building module 20 includes:
  • the coding unit is used to perform visual coding on the operating data to obtain the visualized operating data
  • the first construction unit is used to construct an overview view corresponding to the horizontal federated learning model according to the visualized operating data.
  • the visual view includes a projection view
  • the construction module 20 further includes:
  • the first determining unit is configured to determine index data corresponding to each client terminal according to the operating data
  • the second construction unit is configured to construct a projection view corresponding to the horizontal federated learning model according to the index data, wherein each node in the projection view respectively represents a mapping relationship between a client identifier and the number of iterations.
  • the visual view includes a summary view
  • the construction module 20 further includes:
  • the second determining unit determines statistical data corresponding to the operating data, where the statistical data includes at least one of the following: the number of clients corresponding to the horizontal federated learning model, the number of iterations, and training the horizontal federated learning model The number of changes in the number of samples to be trained, the reduction value corresponding to the loss value corresponding to the horizontal federated learning model, and the increase value of the recognition accuracy of the local model corresponding to each client;
  • the third construction unit is configured to construct a summary view corresponding to the horizontal federated learning model according to the statistical data.
  • the visual view includes a comparison view
  • the construction module 20 further includes:
  • the third determining unit is configured to determine the indicator data corresponding to each client according to the operating data, and determine the target indicator corresponding to the last iterative training of the horizontal federated learning model in the indicator data;
  • the fourth construction unit is used to construct a comparison view corresponding to the horizontal federated learning model according to the target index.
  • the visual view includes a contribution ranking view
  • the construction module 20 further includes:
  • the fourth determining unit is used to determine the ranking order of the running data of the client in each iteration of the training
  • the display unit is configured to display the ranking training in the form of a box-and-whisker graph to construct a ranking view of contribution degrees corresponding to the horizontal federated learning model.
  • the view display device based on the federated learning model further includes:
  • the detection module is used to detect whether an operation instruction to operate the visual view is received
  • the determination module 30 is further configured to determine the content displayed in the visual view according to the operation instruction and the training process if the operation instruction is received.
  • the specific implementation of the view display device based on the federated learning model of the present application is basically the same as the foregoing embodiments of the view display method based on the federated learning model, and will not be repeated here.
  • FIG. 7 is a schematic structural diagram of the hardware operating environment involved in the solution of the embodiment of the present application.
  • FIG. 7 can be a structural schematic diagram of the hardware operating environment of the display device based on the federated learning model.
  • the view display device based on the federated learning model in the embodiment of the present application may be a terminal device such as a PC and a portable computer.
  • the view display device based on the federated learning model may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • the structure of the view display device based on the federated learning model shown in FIG. 7 does not constitute a limitation on the view display device based on the federated learning model, and may include more or less components than shown in the figure. Or some parts are combined, or different parts are arranged.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a view display program based on a federated learning model.
  • the operating system is a program that manages and controls the hardware and software resources of the view display device based on the federated learning model, and supports the running of the view display program based on the federated learning model and other software or programs.
  • the user interface 1003 is mainly used to connect to the terminal device and perform data communication with the terminal device, such as receiving the image to be recognized or the image to be trained sent by the terminal device;
  • the network interface 1004 Mainly used for back-end server to communicate with back-end server;
  • the processor 1001 can be used to call the view display program based on the federated learning model stored in the memory 1005, and execute the steps of the view display method based on the federated learning model as described above .
  • the specific implementation of the view display device based on the federated learning model of the present application is basically the same as the foregoing embodiments of the view display method based on the federated learning model, and will not be repeated here.
  • an embodiment of the present application also proposes a computer-readable storage medium that stores a view display program based on a federated learning model when the view display program based on a federated learning model is executed by a processor Implement the steps of the view display method based on the federated learning model as described above.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Abstract

A federated learning model-based view display method, apparatus and device, and a medium, which relate to the field of fintech. The federated learning model-based view display method comprises the following steps: acquiring run data of each client corresponding to a horizontal federated learning model in an iterative training process of the horizontal federated learning model (S10); according to the run data, constructing a visual view corresponding to the horizontal federated learning model, and determining a training process of the horizontal federated learning model (S20); and determining, according to the training process, content displayed in the visual view (S30).

Description

基于联邦学习模型的视图显示方法、装置、设备及介质View display method, device, equipment and medium based on federated learning model
本申请要求2020年4月30日申请的,申请号为202010370699.6,名称为“基于联邦学习模型的视图显示方法、装置、设备及介质”的中国专利申请的优先权,在此将其全文引入作为参考。This application claims the priority of the Chinese patent application filed on April 30, 2020, the application number is 202010370699.6, and the name is "View display method, device, equipment and medium based on the federated learning model", which is hereby incorporated in its entirety as refer to.
技术领域Technical field
本申请涉及金融科技(Fintech)的联邦学习技术领域,尤其涉及一种基于联邦学习模型的视图显示方法、装置、设备及介质。This application relates to the field of federated learning technology of Fintech, and in particular to a view display method, device, device and medium based on a federated learning model.
背景技术Background technique
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,人工智能技术也不例外,但由于金融行业的安全性、实时性要求,也对人工智能技术提出的更高的要求。With the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually changing to Fintech. Artificial intelligence technology is no exception. However, due to the security and real-time requirements of the financial industry, It also places higher demands on artificial intelligence technology.
传统机器学习采用集中式的方法,将来源不同的数据聚合在一台计算机或数据中心进行训练,然而,这种集中式传统的机器学习方法容易暴露数据隐私,用户不得不通过共享个人的数据来牺牲自己的隐私,以训练更好的机器学习模型。近年来,联邦学习(Federated Learning)使得用户能够协作训练机器学习模型,同时保留自身的数据,特别是包含私人信息的隐私数据留在本地,在这种情况下,用户可以从训练好的机器学习模型中获益,也无需共享其敏感的个人数据。目前,联邦学习中的横向联邦学习(Horizontal Federated Learning)的重点是不同的客户端的数据集拥有相同的特征空间,但数据样本不同,横向联邦学习的运行机制更类似于一个分布式的学习框架,并且使用了安全聚合的方案来保护用户的隐私。Traditional machine learning uses a centralized method to aggregate data from different sources for training in a computer or data center. However, this centralized traditional machine learning method easily exposes data privacy, and users have to share personal data. Sacrifice your privacy to train better machine learning models. In recent years, Federated Learning has enabled users to collaboratively train machine learning models while retaining their own data, especially private data containing private information, to stay locally. In this case, users can learn from well-trained machines Benefit from the model, and there is no need to share its sensitive personal data. At present, the focus of horizontal federated learning in federated learning is that the data sets of different clients have the same feature space, but the data samples are different. The operating mechanism of horizontal federated learning is more similar to a distributed learning framework. And a secure aggregation scheme is used to protect the privacy of users.
虽然联邦学习在工业应用和医疗应用等方面表现良好,但联邦学习的实践者在尝试在他们自己的场景中进行联合建模时遇到了以下问题:(1)可供查看的数据有限,在传统的集中式机器学习框架中,数据中心或服务端几乎了解整个系统的一切,但横向联邦学习框架由于其数据隐私机制的设计,既无权访问客户端的数据,也无法完全控制客户端的行为。因此,诸如客户端数据中的恶意信息之类的潜在风险对联邦学习服务器是不可见的,并且可能会对联邦学习服务器造成意外的结果,从而降低了横向联邦学习模型训练的成功率,且会导致训练所得的横向联邦学习模型识别数据的准确率低下。Although federated learning has performed well in industrial applications and medical applications, the practitioners of federated learning encountered the following problems when trying to perform joint modeling in their own scenarios: (1) The data available for viewing is limited. In the centralized machine learning framework, the data center or the server knows almost everything about the entire system, but the horizontal federated learning framework has no right to access the client's data, nor can it fully control the client's behavior due to the design of its data privacy mechanism. Therefore, potential risks such as malicious information in the client data are invisible to the federated learning server, and may cause unexpected results to the federated learning server, thereby reducing the success rate of horizontal federated learning model training, and will As a result, the accuracy of the trained horizontal federated learning model to recognize data is low.
由此可知,目前在训练横向联邦学习模型过程中,成功率低,且训练所得的横向联邦学习模型识别数据的准确率低下。It can be seen that, in the current process of training the horizontal federated learning model, the success rate is low, and the accuracy of the recognition data of the trained horizontal federated learning model is low.
技术问题technical problem
本申请的主要目的在于提供一种基于联邦学习模型的视图显示方法、装置、设备及介质,旨在解决现有的在训练横向联邦学习模型过程中,成功率低,且训练所得的横向联邦学习模型识别数据的准确率低下的技术问题。The main purpose of this application is to provide a view display method, device, device, and medium based on a federated learning model, which aims to solve the problem of low success rate in the process of training a horizontal federated learning model and the horizontal federated learning obtained from training. The model identifies the technical problem of low accuracy of the data.
技术解决方案Technical solutions
为实现上述目的,本申请提供一种基于联邦学习模型的视图显示方法,所述基于联邦学习模型的视图显示方法包括步骤:In order to achieve the above objective, the present application provides a view display method based on a federated learning model. The view display method based on a federated learning model includes the following steps:
获取横向联邦学习模型迭代训练过程中,所述横向联邦学习模型对应各客户端的运行数据;Acquiring the running data of each client during the iterative training process of the horizontal federated learning model;
根据所述运行数据构建所述横向联邦学习模型对应的可视视图,并确定所述横向联邦学习模型的训练进程;Construct a visual view corresponding to the horizontal federated learning model according to the operating data, and determine the training process of the horizontal federated learning model;
根据所述训练进程确定所述可视视图中显示的内容。The content displayed in the visual view is determined according to the training process.
此外,为实现上述目的,本申请还提供一种基于联邦学习模型的视图显示装置,所述基于联邦学习模型的视图显示装置包括:In addition, in order to achieve the above objective, the present application also provides a view display device based on a federated learning model, and the view display device based on a federated learning model includes:
获取模块,用于获取横向联邦学习模型迭代训练过程中,所述横向联邦学习模型对应各客户端的运行数据;An obtaining module, which is used to obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model;
构建模块,用于根据所述运行数据构建所述横向联邦学习模型对应的可视视图;A building module for building a visual view corresponding to the horizontal federated learning model according to the operating data;
确定模块,用于确定所述横向联邦学习模型的训练进程;根据所述训练进程确定所述可视视图中显示的内容。The determining module is used for determining the training process of the horizontal federated learning model; and determining the content displayed in the visual view according to the training process.
此外,为实现上述目的,本申请还提供一种基于联邦学习模型的视图显示设备,所述基于联邦学习模型的视图显示设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被所述处理器执行时实现如联邦学习服务器对应的基于联邦学习模型的视图显示方法的步骤。In addition, in order to achieve the above-mentioned object, the present application also provides a view display device based on a federated learning model. The view display device based on a federated learning model includes a memory, a processor, and a memory, a processor, and a memory that is stored in the memory and can be processed in the process. A view display program based on a federated learning model running on the processor, and when the view display program based on a federated learning model is executed by the processor, the steps of a view display method based on a federated learning model corresponding to the federated learning server are implemented.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如上所述的基于联邦学习模型的视图显示方法的步骤。In addition, in order to achieve the above object, the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a view display program based on a federated learning model, and the view display program based on a federated learning model is processed When the processor is executed, the steps of the view display method based on the federated learning model as described above are implemented.
有益效果Beneficial effect
本申请通过获取横向联邦学习模型迭代训练过程中,横向联邦学习模型对应各客户端的运行数据,根据运行数据构建所述横向联邦学习模型对应的可视视图,并确定横向联邦学习模型的训练进程,根据训练进程控制可视视图中显示的内容。实现了通过可视视图显示的内容来确定横向联邦学习模型迭代训练对应的训练过程数据,通过训练过程数据来确定迭代训练过程中的各种影响因素,避免由于客户端数据中的恶意信息之类的潜在风险对联邦学习服务器造成意外的结果,从而提高了横向联邦学习模型训练的成功率,以及提高了训练所得的横向联邦学习模型识别数据的准确率。This application obtains the operating data of the horizontal federated learning model corresponding to each client during the iterative training process of the horizontal federated learning model, constructs a visual view corresponding to the horizontal federated learning model according to the running data, and determines the training process of the horizontal federated learning model, Control the content displayed in the visual view according to the training progress. The content displayed in the visual view is used to determine the training process data corresponding to the iterative training of the horizontal federated learning model. The training process data is used to determine various influencing factors in the iterative training process to avoid malicious information in the client data. The potential risks of, cause unexpected results to the federated learning server, thereby increasing the success rate of horizontal federated learning model training, and the accuracy of the recognition data of the trained horizontal federated learning model.
附图说明Description of the drawings
图1是本申请基于联邦学习模型的视图显示方法第一实施例的流程示意图;FIG. 1 is a schematic flowchart of a first embodiment of a view display method based on a federated learning model in this application;
图2是本申请实施例中概览视图的一种示意图;Figure 2 is a schematic diagram of an overview view in an embodiment of the present application;
图3是本申请实施例中可视化后的损失值、识别精度和训练样本数量的一种示意图;FIG. 3 is a schematic diagram of the visualized loss value, recognition accuracy, and number of training samples in an embodiment of the present application;
图4是本申请实施例中投影视图的一种示意图;Fig. 4 is a schematic diagram of a projection view in an embodiment of the present application;
图5是本申请实施例中贡献度排名视图的一种示意图;Fig. 5 is a schematic diagram of a contribution ranking view in an embodiment of the present application;
图6是本申请基于联邦学习模型的视图显示装置较佳实施例的功能示意图模块图;Fig. 6 is a functional schematic block diagram of a preferred embodiment of a view display device based on a federated learning model of the present application;
图7是本申请实施例方案涉及的硬件运行环境的结构示意图。Fig. 7 is a schematic structural diagram of a hardware operating environment involved in a solution of an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
本申请提供一种基于联邦学习模型的视图显示方法,参照图1,图1为本申请基于联邦学习模型的视图显示方法第一实施例的流程示意图。This application provides a view display method based on a federated learning model. Referring to FIG. 1, FIG. 1 is a schematic flowchart of a first embodiment of a view display method based on a federated learning model of this application.
本申请实施例提供了基于联邦学习模型的视图显示方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The embodiment of this application provides an embodiment of the view display method based on the federated learning model. It should be noted that although the logical sequence is shown in the flowchart, in some cases, it can be executed in a different order than here. Steps shown or described.
基于联邦学习模型的视图显示方法应用于联邦学习服务器中,为了便于描述,省略执行主体进行阐述各个实施例。基于联邦学习模型的视图显示方法包括:The view display method based on the federated learning model is applied to the federated learning server. For ease of description, the execution subject is omitted to describe the various embodiments. View display methods based on the federated learning model include:
步骤S10,获取横向联邦学习模型迭代训练过程中,所述横向联邦学习模型对应各客户端的运行数据。Step S10: Obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model.
当侦测到构建横向联邦学习模型对应的可视视图的构建指令时,根据构建指令获取横向联邦学习模型迭代训练过程中,横向联邦学习模型对应各客户端的运行数据。其中,构建指令可由用户根据具体需要而触发,也可在开始构建横向联邦学习模型时触发,即在第一次对横向联邦学习模型进行迭代训练时,自动触发构建指令。每一客户端都存在对应的运行数据,在本实施例中,运行数据至少包括以下一种:客户端标识、客户端名称、横向联邦学习模型每次开始迭代训练时的开始时间戳、客户端本地模型的训练次数、每次进行迭代训练后本地模型对应的损失值、每次进行迭代训练后本地模型对数据识别的识别精度、客户端通过本地数据每一次训练本地模型的开始时间点和结束时间点。本地模型是联邦学习服务器在得到横向联邦学习模型后,发送给各客户端,各客户端存储后的模型。各个客户端在接收到横向联邦学习模型后,将所接收的横向联邦学习模型作为自己的本地模型,并可采用自己本地数据调整该本地模型。可以理解的是,运行数据不会涉及各个客户端用户的隐私数据。When a construction instruction to construct a visual view corresponding to the horizontal federated learning model is detected, the horizontal federated learning model is obtained according to the built instruction during the iterative training process of the horizontal federated learning model, and the horizontal federated learning model corresponds to the running data of each client. Among them, the construction instruction can be triggered by the user according to specific needs, and can also be triggered when the horizontal federated learning model starts to be constructed, that is, the construction instruction is automatically triggered when the horizontal federated learning model is iteratively trained for the first time. Each client has corresponding operating data. In this embodiment, the operating data includes at least one of the following: client identification, client name, start timestamp when the horizontal federated learning model starts iterative training, client The training times of the local model, the corresponding loss value of the local model after each iterative training, the recognition accuracy of the data recognition of the local model after each iterative training, the start time and end of each training of the local model by the client through the local data Point in time. The local model is a model that the federated learning server sends to each client after obtaining the horizontal federated learning model, and each client stores the model. After each client receives the horizontal federated learning model, it uses the received horizontal federated learning model as its own local model, and may use its own local data to adjust the local model. It is understandable that the operating data will not involve the private data of each client user.
具体地,客户端标识用于唯一表示某个客户端,在横向联邦学习迭代训练过程中,可一起传输客户端标识和客户端名称;横向联邦学习模型每次开始迭代训练时的开始时间戳可在开始迭代训练时通过计时器获取;客户端本地模型的训练次数可在每次迭代训练过程中,发送给联邦学习服务器,需要说明的是,训练次数可以等于迭代次数,也可以不等于迭代次数;每次迭代训练都可以得到对应的损失值;识别精度可以在每次迭代训练得到本地模型后,获取预先设置好的待测试数据,将待测试数据输入至本地模型中,得到横向本地模型的输出结果,将输出结果与对应待测试数据的正确结果进行对比,以确定识别精度。Specifically, the client ID is used to uniquely indicate a certain client. During the horizontal federated learning iterative training process, the client ID and client name can be transmitted together; the start timestamp of each time the horizontal federated learning model starts iterative training can be Obtained by a timer when starting iterative training; the training times of the client's local model can be sent to the federated learning server during each iteration of the training process. It should be noted that the training times can be equal to the number of iterations or not equal to the number of iterations ;Each iteration of training can get the corresponding loss value; recognition accuracy can obtain the preset data to be tested after each iteration of training to obtain the local model, and input the data to be tested into the local model to obtain the horizontal local model The output result is compared with the correct result corresponding to the data to be tested to determine the recognition accuracy.
步骤S20,根据所述运行数据构建所述横向联邦学习模型对应的可视视图,并确定所述横向联邦学习模型的训练进程。Step S20: Construct a visual view corresponding to the horizontal federated learning model according to the operating data, and determine the training process of the horizontal federated learning model.
当得到运行数据后,根据运行数据构建横向联邦学习模型对应的可视视图,并确定横向联邦学习模型的训练进程。其中,可视视图至少包括以下一种:概览视图、摘要视图、投影视图、对比视图和贡献度排名视图,概览视图可以显示在对横向联邦学习模型迭代训练过程中,各个客户端的整体运行过程;投影视图可以显示客户端标识和各次迭代训练之间在二维分布的映射关系;摘要视图用于显示横向联邦学习模型迭代训练过程中,各种数据对应的统计信息;比较视图用于显示横向联邦学习模型迭代训练过程中,任意两个客户端对应指标数据的比较情况;贡献度排名视图用于显示各个客户端在不同维度对横向联邦学习模型的贡献度。横向联邦学习模型的训练进程可用横向联邦学习模型进行迭代训练的迭代次数来表示,可以理解的是,横向联邦学习模型训练至收敛状态,会进行一定次数的迭代训练,而每次迭代训练,都会改变横向模型学习模型对应的模型参数,对应的,每次迭代训练过程中,各个客户端对应的部分运行数据也会改变,如损失值和识别精度等会改变,因此,在本实施例中,可通过迭代次数来确定横向联邦学习模型的训练进程。具体地,在横向联邦学习模型迭代训练过程中,通过计时器计算横向联邦学习模型的迭代次数,横向联邦学习模型每迭代训练一次,计时器对应的数值加1,从而在需要确定横向联邦学习模型训练进程的时候,获取计时器对应的数值,根据该数值确定横向联邦学习的迭代次数,从而确定横向联邦学习模型的训练进程。When the operating data is obtained, a visual view corresponding to the horizontal federated learning model is constructed based on the running data, and the training process of the horizontal federated learning model is determined. Among them, the visual view includes at least one of the following: overview view, summary view, projection view, comparison view, and contribution ranking view. The overview view can display the overall running process of each client during the iterative training process of the horizontal federated learning model; The projection view can display the mapping relationship between the client ID and the two-dimensional distribution of each iteration of the training; the summary view is used to display the statistical information corresponding to various data during the iterative training process of the horizontal federated learning model; the comparison view is used to display the horizontal During the iterative training process of the federated learning model, the comparison of the corresponding indicator data of any two clients; the contribution ranking view is used to display the contribution of each client to the horizontal federated learning model in different dimensions. The training process of the horizontal federated learning model can be represented by the number of iterations of the horizontal federated learning model for iterative training. It is understandable that when the horizontal federated learning model is trained to the convergence state, a certain number of iterative training will be performed, and each iteration of training will Changing the model parameters corresponding to the horizontal model learning model. Correspondingly, during each iteration of the training process, some of the running data corresponding to each client will also change, such as the loss value and recognition accuracy. Therefore, in this embodiment, The training process of the horizontal federated learning model can be determined by the number of iterations. Specifically, in the iterative training process of the horizontal federated learning model, the number of iterations of the horizontal federated learning model is calculated by a timer. Each iteration of the horizontal federated learning model is trained, the value corresponding to the timer is increased by 1, so as to determine the horizontal federated learning model when needed. During the training process, the value corresponding to the timer is obtained, and the number of iterations of the horizontal federated learning is determined according to the value, thereby determining the training process of the horizontal federated learning model.
进一步地,所述运行数据至少包括以下一种:客户端标识、各次迭代训练的开始时间戳、客户端对应的训练样本数量、本地模型对应的损失值、各客户端通过本地数据训练本地模型的开始时间点和结束时间点,所述可视视图包括概览视图;所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:Further, the operating data includes at least one of the following: client identification, the start timestamp of each iteration of training, the number of training samples corresponding to the client, the loss value corresponding to the local model, and the local model trained by each client through the local data The visual view includes an overview view; the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
步骤a,对所述运行数据进行可视化编码,得到可视化后的运行数据。Step a: Perform visual coding on the operating data to obtain visualized operating data.
进一步地,当可视视图为概览视图时,对各个运行数据进行可视化编码,得到可视化后的运行数据。需要说明的是,对各个客户端的运行数据的处理过程都一样,因此为了便于描述,本实施例以一个客户端的运行数据为例进行说明。具体地,可视化横向联邦学习模型对应的横向联邦学习网络的变化过程,需要说明的是,为了度量横向联邦学习模型迭代训练过程中客户端加入和退出时带来的横向联邦学习网络的“网络结构”的变化,将当前迭代训练对应的各客户端和联邦学习服务器看出的横向网络,并引入了基于变化中心性的网络总体变化率来度量,该度量考虑了横向联邦学习网络在一段时间内的变化过程。Further, when the visual view is the overview view, visual coding is performed on each operating data to obtain the visualized operating data. It should be noted that the process of processing the running data of each client is the same. Therefore, for ease of description, this embodiment takes the running data of a client as an example for description. Specifically, to visualize the change process of the horizontal federated learning network corresponding to the horizontal federated learning model, it needs to be explained that in order to measure the “network structure of the horizontal federated learning network when the client joins and exits during the iterative training process of the horizontal federated learning model” ”Changes, the current iterative training corresponding to the horizontal network seen by each client and federated learning server, and introduces the overall change rate of the network based on the centrality of the change to measure, this metric takes into account the horizontal federated learning network over a period of time The process of change.
在本实施例中,确定每次迭代训练过程中,各个客户端在横向联邦学习网络中的位置,具体地,可通过客户端标识和当前迭代训练的开始时间戳确定对应客户端在横向联邦学习网络中的位置,具体地,可预先设置好每次迭代训练时,各个客户端在横向联邦学习网络中的位置,预先建立客户端标识、开始时间戳和位置标识之间的映射关系。当确定当前迭代训练的开始时间戳和客户端标识后,通过开始时间戳、客户端标识和该映射关系即可确定对应客户端在横向联邦学习网络中的位置。In this embodiment, the position of each client in the horizontal federated learning network is determined during each iteration of the training process. Specifically, the client identifier and the start timestamp of the current iteration training can be used to determine that the corresponding client is in the horizontal federated learning network. The location in the network, specifically, the location of each client in the horizontal federated learning network during each iteration of training can be preset, and the mapping relationship between the client ID, the start timestamp, and the location ID can be established in advance. After the start timestamp and client identification of the current iterative training are determined, the position of the corresponding client in the horizontal federated learning network can be determined through the start timestamp, the client identification and the mapping relationship.
可视化横向联邦学习模型每次开始迭代训练时的开始时间戳、每次进行迭代训练后本地模型对应的损失值、每次进行迭代训练后本地模型对数据识别的识别精度、客户端通过本地数据每一次训练本地模型的开始时间点和结束时间点等,对应得到可视化后的开始时间戳、损失值、识别精度、开始时间点和结束时间点。具体地,采用盒须图来表示在每一次迭代训练过程中,各个客户端的识别精度和损失值分布,并用曲线连接每次迭代训练过程中,识别精度和损失值对应的平均值,以得到可视化后的识别精度和可视化后的损失值,其中,盒须图是一种用作显示一组数据分散情况资料的统计图。将每一次迭代训练过程中各个客户端对应的训练样本数量可视化为曲线,得到可视化后的训练样本数量,进一步地,可以在该曲线对应区域添加对应条形图,通过该条形图表示对应迭代训练过程中,训练样本总数量,可以理解的是,训练样本总数量等于各个客户端对应训练样本数量之和。通过客户端的本地数据训练本地模型的开始时间点和结束时间点可以计算得到对应客户端每一次训练本地模型的训练时长,通过开始时间点和结束时间点之间连线的斜率表示各个客户端的训练时长,从而得到可视化后的结束时间点和开始时间点。具体地,可参照图3,图3是本申请实施例中可视化后的损失值、识别精度和训练样本数量的一种示意图,其中,图3中由左向右,第一幅图表示可视化后的损失值(loss),第二幅图表示可视化后的识别精度(Accuracy),第三幅图表示可视化后的训练样本数量(Sampie Number)。Visualize the start timestamp of each time the horizontal federated learning model starts iterative training, the loss value corresponding to the local model after each iterative training, the recognition accuracy of the data recognition by the local model after each iterative training, and the client through the local data every time The start time point and end time point of the local model are trained once, and the visualized start time stamp, loss value, recognition accuracy, start time point and end time point are correspondingly obtained. Specifically, a box-and-whisker graph is used to represent the identification accuracy and loss value distribution of each client during each iteration training process, and a curve is used to connect the average value of the identification accuracy and loss value during each iteration training process to obtain visualization After the recognition accuracy and the visualized loss value, the box and whisker chart is a statistical chart used to display a set of data dispersion information. Visualize the number of training samples corresponding to each client during each iteration of the training process as a curve to obtain the number of training samples after visualization. Further, you can add a corresponding bar graph to the corresponding area of the curve, and use the bar graph to indicate the corresponding iteration During the training process, the total number of training samples, it can be understood that the total number of training samples is equal to the sum of the number of training samples corresponding to each client. The start time point and end time point of training the local model through the client's local data can be calculated to obtain the training time of each training local model of the corresponding client. The slope of the connection between the start time point and the end time point represents the training of each client Time length, so as to get the end time point and start time point after visualization. Specifically, refer to Figure 3, which is a schematic diagram of the visualized loss value, recognition accuracy, and the number of training samples in an embodiment of the present application. The loss value of (loss), the second picture shows the recognition accuracy (Accuracy) after visualization, and the third picture shows the number of training samples after visualization (Sampie Number).
步骤b,根据可视化后的运行数据构建所述横向联邦学习模型对应的概览视图。Step b: Construct an overview view corresponding to the horizontal federated learning model according to the visualized operating data.
当得到可视化后的运行数据后,根据可视化后的运行数据构建横向联邦学习模型对应的概览视图。可以理解的是,概览视图由各个可视化后的运行数据组成,通过概览视图可确定在横向联邦学习模型迭代训练过程中,各个客户端的运行情况。When the visualized operating data is obtained, an overview view corresponding to the horizontal federated learning model is constructed based on the visualized operating data. It is understandable that the overview view is composed of various visualized operating data. Through the overview view, the operating conditions of each client during the iterative training process of the horizontal federated learning model can be determined.
需要说明的是,通过概览视图,可以发现,参与横向联邦学习模型迭代训练的客户端随着迭代训练过程的演变而变化。通过概览视图可以看出联邦学习网络的变化,如通过概览视图可以确定,在每次迭代训练过程中,参与迭代训练的各个客户端所提供的样本数量总体上是均匀分布的,即各个客户端所提供的样本数量之间的差值在预设范围内,该预设范围可根据具体需要而设置;通过概览视图,也可以确定各个客户端对本地模型进行训练的开始时间点和结束时间点,可以理解的是,每个客户端的本地模型训练的开始时间点可能不一样,这可能是网络延迟造成的。由于各个客户端采用本地数据训练本地模型的本地数据数量不相同,因此各个客户端对本地模型进行训练的训练时长也不一样。可以理解的是,通过概览视图确定各个客户端对本地模型进行训练的训练时长,根据该训练时长调整进行下一次迭代训练的开始时间,即调整相邻两次迭代训练之间的等待时长,以更好的适应各个客户端对应的训练时长。可以理解的是,等待时长大于或者等于客户端对应的最大训练时长即可。具体地,通过概览视图,可以确定,随着迭代次数的增加,损失值在不断减小,识别精度在不断提高。进一步地,通过概览视图,也可以确定哪几次迭代训练对应的识别精度变化幅度比较大,哪几次迭代训练对应的识别精度变化幅度比较小。It should be noted that through the overview view, it can be found that the clients participating in the iterative training of the horizontal federated learning model change with the evolution of the iterative training process. The changes in the federated learning network can be seen through the overview view. For example, through the overview view, it can be determined that in each iteration of the training process, the number of samples provided by each client participating in the iterative training is generally evenly distributed, that is, each client The difference between the number of samples provided is within a preset range, which can be set according to specific needs; through the overview view, you can also determine the start time point and end time point for each client to train the local model It is understandable that the start time of the local model training of each client may be different, which may be caused by network delays. Since each client uses local data to train the local model with different amounts of local data, the training time for each client to train the local model is also different. It is understandable that the training duration for each client to train the local model is determined through the overview view, and the start time of the next iteration training is adjusted according to the training duration, that is, the waiting time between two adjacent iteration training is adjusted to Better adapt to the training duration of each client. It is understandable that the waiting time should be greater than or equal to the maximum training time corresponding to the client. Specifically, through the overview view, it can be determined that as the number of iterations increases, the loss value is continuously reduced and the recognition accuracy is continuously improved. Furthermore, through the overview view, it is also possible to determine which iterations of training correspond to a larger change in recognition accuracy, and which iterations of training correspond to a relatively small change in recognition accuracy.
具体地,可参照图2,图2是本申请实施例中概览视图的一种示意图,在图2中,每个圆角矩形框表示一次迭代训练,在每个圆角矩形框中的小圆圈表示参与当前迭代训练的客户端,由图2可知,迭代次数在y(竖轴)方向上对齐,在每个圆角矩形框中,各个小圆圈的出现顺序是表示在迭代训练过程中,各个客户端出现的先后顺序;图2中的x(横轴)方向上的坐标是经过调整的,从而使图2中各条连线不会交叉,以最小化整体空间的利用率。需要说明的是,图2中的实心小圆圈表示只参与了部分迭代训练的客户端。由图2可知,通过概览视图可视化每一次迭代训练过程中所涉及的客户端。Specifically, refer to FIG. 2, which is a schematic diagram of an overview view in an embodiment of the present application. In FIG. 2, each rounded rectangular box represents an iterative training, and a small circle in each rounded rectangular box Indicates the client participating in the current iterative training. As shown in Figure 2, the number of iterations is aligned in the y (vertical axis) direction. The order in which the clients appear; the coordinates in the x (horizontal axis) direction in Figure 2 have been adjusted so that the lines in Figure 2 will not cross, in order to minimize the overall space utilization. It should be noted that the small solid circles in Figure 2 represent clients that only participate in part of the iterative training. It can be seen from Figure 2 that the overview view visualizes the clients involved in each iteration of the training process.
步骤S30,根据所述训练进程确定所述可视视图中显示的内容。Step S30: Determine the content displayed in the visual view according to the training process.
当确定横向联邦学习模型的训练进程时,根据该训练进程控制可视视图中显示的内容,以通过所述可视视图显示的内容确定横向联邦学习模型迭代训练的训练过程数据。可以理解的是,不同的可视视图,所得的训练过程数据也是不一样的,如概览视图对应的训练过程数据是各个客户端在横向联邦学习模型迭代训练过程中,各个客户端的运行数据的另外一种表现形式。随着横向联邦学习模型训练进程的改变,横向联邦学习模型的模型参数会改变,客户端的运行数据也会改变,因此对应可视视图中显示的内容也不一样,即可视视图显示的内容随着横向联邦学习模型训练进程的改变而改变,从而通过可视视图可以查看客户端在横向联邦学习模型训练过程中的运行情况。可以理解的是,本实施例可根据各个客户端对应可视视图所显示的内容确定各个客户端是否存在异常情况,如存在一个客户端的可视视图与其他客户端的可视视图存在较大差别,则可确定该客户端可能存在异常情况。When determining the training process of the horizontal federated learning model, the content displayed in the visual view is controlled according to the training process to determine the training process data of the iterative training of the horizontal federated learning model through the content displayed in the visual view. It is understandable that the training process data obtained from different visual views is also different. For example, the training process data corresponding to the overview view is the additional operating data of each client during the iterative training process of the horizontal federated learning model. A form of expression. As the training process of the horizontal federated learning model changes, the model parameters of the horizontal federated learning model will change, and the running data of the client will also change. Therefore, the content displayed in the corresponding visual view is different. It changes as the training process of the horizontal federated learning model changes, so that the client's running status during the training of the horizontal federated learning model can be viewed through the visual view. It is understandable that this embodiment can determine whether each client has an abnormal condition according to the content displayed in the corresponding visual view of each client. For example, there is a big difference between the visual view of one client and the visual view of other clients. It can be determined that there may be an abnormal situation in the client.
本实施例通过获取横向联邦学习模型迭代训练过程中,横向联邦学习模型对应各客户端的运行数据,根据运行数据构建所述横向联邦学习模型对应的可视视图,并确定横向联邦学习模型的训练进程,根据训练进程控制可视视图中显示的内容。实现了通过可视视图显示的内容来确定横向联邦学习模型迭代训练对应的训练过程数据,通过训练过程数据来确定迭代训练过程中的各种影响因素,避免由于客户端数据中的恶意信息之类的潜在风险对联邦学习服务器造成意外的结果,从而提高了横向联邦学习模型训练的成功率,以及提高了训练所得的横向联邦学习模型识别数据的准确率。In this embodiment, by acquiring the running data of the horizontal federated learning model corresponding to each client during the iterative training process of the horizontal federated learning model, construct a visual view corresponding to the horizontal federated learning model according to the running data, and determine the training process of the horizontal federated learning model , According to the training process to control the content displayed in the visual view. The content displayed in the visual view is used to determine the training process data corresponding to the iterative training of the horizontal federated learning model. The training process data is used to determine various influencing factors in the iterative training process to avoid malicious information in the client data. The potential risks of, cause unexpected results to the federated learning server, thereby increasing the success rate of horizontal federated learning model training, and the accuracy of the recognition data of the trained horizontal federated learning model.
进一步地,传统的集中式机器学习通常以分离的方式进行模型训练和推断,而联邦学习服务器通常是将训练和推断过程进行耦合。换句话来说,联邦学习服务器是一个可以不断更新以适应可能发生变化的数据分布,对于联邦学习服务器维护人员来说,仅仅依靠一些简单的日志和度量来解释给定阶段或时刻的信息并要求在短时间内做出快速而明知的决策是不够的。因此,迫切需要一种方法可以对来自不同客户端随着时间变化的“时空数据”进行有效的表达。实现这一点有助于对联邦学习聚合策略进行阶段性调整,并及时审查横向联邦学习模型的迭代训练过程,以便更有效地进行干预。而本实施例通过根据训练进程控制可视视图中显示的内容,以通过可视视图显示的内容确定横向联邦学习模型迭代训练对应的训练过程数据,随着横向联邦学习模型的训练过程变化而改变可视视图显示的内容,以通过可视视图表达横向联邦学习模型对应客户端在迭代训练过程中的变化情况,以便于相关运维人员及时审查横向联邦学习模型的迭代训练过程,以便更有效地进行干预,从而优化训练所得的横向联邦学习模型。Further, traditional centralized machine learning usually conducts model training and inference in a separate manner, while a federated learning server usually couples the training and inference processes. In other words, the federated learning server is a data distribution that can be continuously updated to adapt to possible changes. For the federated learning server maintainers, they only rely on some simple logs and metrics to interpret the information at a given stage or moment. It is not enough to require quick and informed decisions in a short period of time. Therefore, there is an urgent need for a method that can effectively express the "temporal and spatial data" from different clients over time. Achieving this is helpful for phased adjustment of the federated learning aggregation strategy, and timely review of the iterative training process of the horizontal federated learning model in order to intervene more effectively. In this embodiment, the content displayed in the visual view is controlled according to the training process to determine the training process data corresponding to the iterative training of the horizontal federated learning model through the content displayed in the visible view, which changes as the training process of the horizontal federated learning model changes. The content displayed in the visual view is used to express the changes in the iterative training process of the horizontal federated learning model corresponding to the client through the visual view, so that relevant operation and maintenance personnel can review the iterative training process of the horizontal federated learning model in a timely manner, so as to be more effective Intervene to optimize the horizontal federated learning model obtained from training.
进一步地,提出本申请基于联邦学习模型的视图显示方法第二实施例。所述基于联邦学习模型的视图显示方法第二实施例与所述基于联邦学习模型的视图显示方法第一实施例的区别在于,所述可视视图包括投影视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:Further, a second embodiment of the view display method based on the federated learning model of this application is proposed. The difference between the second embodiment of the view display method based on the federated learning model and the first embodiment of the view display method based on the federated learning model is that the visual view includes a projection view, and the construction is based on the operating data. The steps of the visual view corresponding to the horizontal federated learning model include:
步骤c,根据所述运行数据确定各客户端对应的指标数据。Step c: Determine indicator data corresponding to each client terminal according to the operating data.
当所需要构建的可视视图为投影视图,且获取到运行数据后,根据运行数据确定各客户端对应的指标数据。需要说明的是,在构建投影视图时,运行数据还可包括本地模型对应的梯度直方图和本地模型对应的权重直方图,需要说明的是,在得到损失值后,根据损失值可确定各个本地模型对应模型参数的梯度,从而根据所确定的梯度可得到对应的梯度直方图。权重是本地模型中各个模型参数对应的权重。在本实施例,指标数据至少包括以下一种:损失值、识别精度、训练演变数量、权重直方图和梯度值直方图。When the visual view that needs to be constructed is a projection view, and the operating data is obtained, the indicator data corresponding to each client terminal is determined according to the operating data. It should be noted that when constructing the projection view, the running data can also include the gradient histogram corresponding to the local model and the weight histogram corresponding to the local model. The model corresponds to the gradient of the model parameters, so that the corresponding gradient histogram can be obtained according to the determined gradient. The weight is the weight corresponding to each model parameter in the local model. In this embodiment, the index data includes at least one of the following: loss value, recognition accuracy, training evolution number, weight histogram and gradient value histogram.
步骤d,根据所述指标数据构建所述横向联邦学习模型对应的投影视图,其中,所述投影视图中的各个节点分别表示客户端标识和迭代次数之间的映射关系。Step d: Construct a projection view corresponding to the horizontal federated learning model according to the indicator data, wherein each node in the projection view respectively represents a mapping relationship between a client identifier and the number of iterations.
当得到指标数据后,根据指标数据,基于用 t-SNE(t-distributed stochastic neighbor embedding,t分布随机邻居嵌入)投影构建横向联邦学习模型对应的投影视图,需要说明的是,该投影视图是一个2D(二维)视图, t-SNE时一种降维技术,用于创建低维表示,并保留局部相似性来传达邻域结构。可以理解的是,本实施例也可以采用PCA(Principal Component Analysis,主成分分析)和MDS(multidimensional scaling o,多维尺度分析)等降维技术构建投影视图。通过投影视图,可以查看在横向联邦学习模型迭代训练过程中,潜在的聚类和异常值,从而确定横向联邦学习模型迭代训练过程中,存在异常的客户端。在投影视图中,存在至少一个节点,每个节点都表示一堆“客户端标识-迭代次数”之间的映射关系,即本实施例是将“客户端标识-迭代次数”投影到二维视图中。不同迭代次数,对应的投影视图不一样。在投影视图中,联邦学习服务器为投影视图中一个特殊的客户端。 When the index data is obtained, according to the index data, the projection view corresponding to the horizontal federated learning model is constructed based on the t-SNE (t-distributed stochastic neighbor embedding, t-distributed stochastic neighbor embedding) projection. It should be noted that the projection view is a 2D (two-dimensional) view, t-SNE is a dimensionality reduction technique used to create low-dimensional representations and retain local similarity to convey neighborhood structure. It will be appreciated that the present embodiment can also be employed PCA (Principal Component Analysis, Principal Component Analysis) and MDS (multidimensional scaling o, multidimensional scaling analysis) Construction of dimension reduction projection views. Through the projection view, you can view the potential clusters and outliers in the iterative training process of the horizontal federated learning model, so as to determine the abnormal clients during the iterative training of the horizontal federated learning model. In the projection view, there is at least one node, and each node represents a bunch of mapping relationships between "client identification-number of iterations", that is, in this embodiment, "client identification-number of iterations" is projected onto a two-dimensional view. middle. The corresponding projection views are different for different iteration times. In the projection view, the federated learning server is a special client in the projection view.
在投影视图中,第一次迭代训练对应的联邦学习服务器作为投影视图的起点,最后一次迭代训练对应的联邦学习服务器作为投影视图的终点,中间出现节点为迭代训练过程中所涉及的客户端,然后将所有节点都连接起来,从而通过投影视图可确定在横向联邦学习模型迭代训练过程中,客户端的演变过程。In the projection view, the federated learning server corresponding to the first iterative training is used as the starting point of the projection view, and the federated learning server corresponding to the last iterative training is used as the end point of the projection view. The nodes appearing in the middle are the clients involved in the iterative training process. Then all the nodes are connected, so that through the projection view, the evolution process of the client can be determined in the iterative training process of the horizontal federated learning model.
具体地,参照图4,图4是本申请实施例中投影视图的一种示意图。在图4中,连线的前后两个实心小圆圈表示横向联邦学习模型的第一次迭代训练和最后一次迭代训练,连线中间的空心小圆圈表示参与横向联邦学习模型的各个客户端的客户端标识和迭代次数之间的映射关系,如某个客户端标识为A,迭代次数为第10次,则在图4中,某个空心小圆圈表示“A-10”。需要说明的是,若某个小圆圈偏离曲线较远,则说明该小圆圈对应客户端在横向联邦学习模型迭代训练过程的贡献度较小,且比较有可能是存在异常的客户端,即可将该小圆圈对应的客户端确定为异常客户端。Specifically, referring to FIG. 4, FIG. 4 is a schematic diagram of a projection view in an embodiment of the present application. In Figure 4, the two small solid circles before and after the connection represent the first iterative training and the last iterative training of the horizontal federated learning model. The hollow small circles in the middle of the connection represent the clients of each client participating in the horizontal federated learning model. The mapping relationship between the identifier and the number of iterations. For example, a certain client identifier is A and the number of iterations is the 10th time. In Figure 4, a small hollow circle represents "A-10". It should be noted that if a small circle deviates far from the curve, it means that the small circle corresponds to the client's contribution to the iterative training process of the horizontal federated learning model, and it is more likely to be an abnormal client. The client corresponding to the small circle is determined to be an abnormal client.
进一步地,所述可视视图包括摘要视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:Further, the visual view includes a summary view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
步骤e,确定所述运行数据对应的统计数据,其中,所述统计数据至少包括以下一种:所述横向联邦学习模型对应客户端的客户端数量、迭代次数、训练所述横向联邦学习模型的待训练样本数的变化数量、所述横向联邦学习模型对应的损失值对应的减少值和各客户端对应本地模型的识别精度的增长值;Step e: Determine statistical data corresponding to the operating data, where the statistical data includes at least one of the following: the number of clients corresponding to the horizontal federated learning model, the number of iterations, and the waiting time for training the horizontal federated learning model. The number of changes in the number of training samples, the reduction value corresponding to the loss value corresponding to the horizontal federated learning model, and the increase value of the recognition accuracy of the local model corresponding to each client;
步骤f,根据所述统计数据构建所述横向联邦学习模型对应的摘要视图。Step f: Construct a summary view corresponding to the horizontal federated learning model according to the statistical data.
进一步地,当所需要构建的可视视图为摘要视图,且获取到运行数据后,确定运行数据对应的统计数据,统计数据至少包括以下一种,横向联邦学习模型对应客户端的客户端数量、迭代次数、训练横向联邦学习模型的待训练样本数的变化数量、横向联邦学习模型对应的损失值对应的减少值和各客户端对应本地模型的识别精度的增长值,其中,变化数量为前后相邻两次迭代训练对应待训练样本数的数量差值,该数据差值等于后一次迭代训练对应待训练样本数的数量减去前一次迭代训练对应待训练样本数据的数量;减少值是前后相邻两次迭代训练对应损失值之间的损失差值,损失差值等于前一次迭代训练对应的损失值减去后一次迭代训练对应的损失值,需要说明的,本地模型的损失值也是由横向联邦学习模型计算得到的,在同一次迭代训练过程中,本地模型对应的损失值和横向联邦学习模型对应的损失值相等;增长值等于后一次迭代训练对应本地模型的识别精度减去前一次迭代训练对应本地模型的识别精度。Further, when the visual view that needs to be constructed is a summary view, and after the operating data is obtained, the statistical data corresponding to the operating data is determined. The statistical data includes at least one of the following. The horizontal federated learning model corresponds to the number of clients of the client and the number of iterations. The number of changes in the number of samples to be trained for training the horizontal federated learning model, the reduction value corresponding to the loss value corresponding to the horizontal federated learning model, and the increase value of the recognition accuracy of each client corresponding to the local model, where the number of changes is two adjacent to each other. The second iterative training corresponds to the difference in the number of samples to be trained. The difference in data is equal to the number of samples to be trained in the next iterative training minus the number of samples to be trained in the previous iterative training; the reduced value is two adjacent ones. The loss difference between the corresponding loss values of the second iteration training. The loss difference is equal to the loss value corresponding to the previous iteration training minus the loss value corresponding to the next iteration training. It should be noted that the loss value of the local model is also learned by the horizontal federation Calculated by the model, in the same iterative training process, the loss value corresponding to the local model is equal to the loss value corresponding to the horizontal federated learning model; the increase value is equal to the recognition accuracy of the local model corresponding to the last iteration training minus the corresponding one of the previous iteration training The recognition accuracy of the local model.
当得到统计数据后,根据统计数据构建横向联邦学习模型对应的摘要视图,其中,摘要视图可通过表格或者图表的形式将统计数据显示出来。When the statistical data is obtained, a summary view corresponding to the horizontal federated learning model is constructed based on the statistical data, where the summary view can display the statistical data in the form of a table or a graph.
进一步地,所述步骤f包括:Further, the step f includes:
步骤f1,根据所述统计数据,以横向联邦学习模型对应的迭代次数为横坐标,对应的统计数据为纵坐标,构建出横向联邦学习模型对应的各个统计数据的摘要视图。Step f1: According to the statistical data, the number of iterations corresponding to the horizontal federated learning model is taken as the abscissa, and the corresponding statistical data is taken as the ordinate to construct a summary view of each statistical data corresponding to the horizontal federated learning model.
具体地,在构建摘要视图过程中,可以横向联邦学习模型对应的迭代次数为横坐标,对应的统计数据为纵坐标,构建出横向联邦学习模型对应的各个统计数据的摘要视图。如在构建客户端数量对应的摘要视图过程中,以迭代次数为横坐标,每次迭代训练过程中,参与迭代训练的客户端数量为纵坐标,构建得到客户端数量对应的摘要视图,通过摘要视图,可以看出已进行的迭代训练中,客户端数量的变化。可以理解的是,对于各种统计数据,构建过程的原理都是相似的,本实施例不再重复赘述。可以理解的是,本实施例可以构建得到客户端数量、待训练样本数的变化数量、损失值对应的减少值和识别精度的增长值等对应的摘要视图。Specifically, in the process of constructing the summary view, the number of iterations corresponding to the horizontal federated learning model may be the abscissa, and the corresponding statistical data may be the ordinate to construct a summary view of each statistical data corresponding to the horizontal federated learning model. For example, in the process of constructing a summary view corresponding to the number of clients, the number of iterations is used as the abscissa, and the number of clients participating in the iterative training is the ordinate during each iteration training process, and the summary view corresponding to the number of clients is constructed. View, you can see the changes in the number of clients in the iterative training that has been carried out. It is understandable that for various statistical data, the principles of the construction process are similar, and will not be repeated in this embodiment. It is understandable that this embodiment can construct summary views corresponding to the number of clients, the number of changes in the number of samples to be trained, the decrease value corresponding to the loss value, and the increase value of the recognition accuracy.
进一步地,所述可视视图包括比较视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:Further, the visual view includes a comparison view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
步骤g,根据所述运行数据确定各客户端对应的指标数据,并在所述指标数据中确定所述横向联邦学习模型最后一次迭代训练对应的目标指标。Step g: Determine the index data corresponding to each client according to the operating data, and determine the target index corresponding to the last iterative training of the horizontal federated learning model in the index data.
进一步地,当所需要构建的可视视图为比较视图,且获取到运行数据后,根据运行数据确定各客户端对应的指标数据,其中,指标数据指标至少包括以下一种:识别精度、损失值、本地模型的训练次数、权重直方图和梯度直方图。需要说明的是,指标数据是运行数据中的一部分。在本实施例中,可预先设置好哪些运行数据为客户端对应的指标数据,具体地,可为指标数据添加特定的指标标识,当获取到运行数据后,检测哪些运行数据携带指标标识,将携带指标标识的运行数据确定为指标数据,本实施例不限制指标数据的表现形式。Further, when the visual view that needs to be constructed is a comparison view, and after the operating data is obtained, the indicator data corresponding to each client terminal is determined according to the operating data, where the indicator data indicator includes at least one of the following: recognition accuracy, loss value, The training times, weight histogram and gradient histogram of the local model. It should be noted that the indicator data is part of the operating data. In this embodiment, it is possible to pre-set which operating data is the indicator data corresponding to the client. Specifically, a specific indicator identifier can be added to the indicator data. After the operating data is obtained, it is detected which operating data carries the indicator identifier, and The operating data carrying the indicator identifier is determined to be indicator data, and this embodiment does not limit the expression form of the indicator data.
需要说明的是,比较视图至少是由两个客户端之间指标数据构建而成的。当确定指标数据后,在指标数据中确定横向联邦学习模型最后一次迭代训练对应的目标指标,该目标指标为比较视图中的比较基准,即通过目标指标来比较两个客户端的相关数据。可以理解的是,目标指标至少为一个,在本实施例中,可将权重直方图和梯度直方图设置为目标指标。It should be noted that the comparison view is at least constructed from indicator data between the two clients. After determining the index data, determine the target index corresponding to the last iterative training of the horizontal federated learning model in the index data. The target index is the comparison benchmark in the comparison view, that is, the target index is used to compare the relevant data of the two clients. It can be understood that there is at least one target indicator. In this embodiment, the weight histogram and the gradient histogram can be set as the target indicators.
步骤h,根据所述目标指标构建所述横向联邦学习模型对应的比较视图。Step h: Construct a comparison view corresponding to the horizontal federated learning model according to the target index.
当确定目标指标后,根据目标指标构建横向联邦学习模型对应的比较视图。具体地,通过比较视图,可以获取各迭代次数中,各客户端对应的权重直方图和梯度直方图,然后将同一迭代次数,或者不同迭代次数的至少两个客户端之间的权重直方图和梯度直方图进行对比,以得到至少两个客户端之间的权重直方图和梯度直方图之间的相似性,并将该相似性作为一个新的指标值,即将权重直方图和梯度直方图转换成一个数值,因此,从而可将迭代训练过程中,各个客户端对应的指标数据都转换成数值,便于用户分析迭代训练过程中的各个客户端。When the target index is determined, the comparison view corresponding to the horizontal federated learning model is constructed according to the target index. Specifically, by comparing the views, it is possible to obtain the weight histogram and gradient histogram corresponding to each client in each iteration number, and then combine the weight histogram and the weight histogram between at least two clients with the same iteration number or different iteration numbers. The gradient histogram is compared to obtain the similarity between the weight histogram and the gradient histogram between at least two clients, and the similarity is used as a new indicator value, that is, the weight histogram and the gradient histogram are converted Therefore, in the iterative training process, the indicator data corresponding to each client can be converted into a numerical value, which is convenient for users to analyze each client in the iterative training process.
具体地,步骤h包括:Specifically, step h includes:
步骤h1,获取同一迭代训练过程中,联邦学习网络结构中相邻客户端对应的目标指标,根据该相邻客户端对应的目标指标构建对应的比较视图。Step h1: Obtain target indicators corresponding to neighboring clients in the federated learning network structure in the same iterative training process, and construct a corresponding comparison view according to the target indicators corresponding to the neighboring clients.
具体地,在构件比较视图过程中,可比较各次迭代训练过程,在联邦学习网络结构中相邻客户端对应的目标指标,然后将相邻客户端的客户端名称或者客户端标识作为横坐标,将相邻客户端对应的目标指标作为纵坐标构建该相邻客户端对应的比较视图。需要说明的是,在训练横向联邦学习模型过程中,由于联邦学习网络的性质,在联邦学习网络中相邻客户端的特性是相似的,因此,若相邻两个客户端之间的比较视图表明这两个客户端差别较大,则可确定其中一个客户端在迭代训练过程中存在异常情况,此时,可结合这两个客户端与另外客户端之间的比较视图来确定存在异常的客户端。可以理解的是,除了联邦学习网络结构中的第一个客户端和最后一个客户端,其余客户端都存在两个相邻的客户端,一个是左相邻的客户端,一个是右相邻的客户端。Specifically, in the component comparison view process, each iteration of the training process can be compared, the target indicators corresponding to neighboring clients in the federated learning network structure, and then the client name or client identifier of the neighboring client as the abscissa, The target indicator corresponding to the neighboring client terminal is used as the ordinate to construct a comparison view corresponding to the neighboring client terminal. It should be noted that in the process of training the horizontal federated learning model, due to the nature of the federated learning network, the characteristics of adjacent clients in the federated learning network are similar. Therefore, if the comparison view between two adjacent clients shows There is a big difference between the two clients, you can determine that one of the clients has an abnormal situation during the iterative training process. At this time, you can combine the comparison views between the two clients and the other client to determine the abnormal client end. It is understandable that, except for the first client and the last client in the federated learning network structure, there are two adjacent clients for the other clients, one is the left-adjacent client and the other is the right-adjacent. Client.
进一步地,在本实施例中的比较视图中,每一行的矩形表示一个客户端,通过矩形中不同颜色的条形表示该客户端各个指标数据对应的值,不同客户端对应的同一指标数据条形起点相同,从而可通过条形的终点来确定各个指标数据之间的相似度。比较视图中的顶行可以用来表示联邦学习服务器。进一步地,也可以获取不同迭代次数对应的比较视图,然后将不同迭代次数对应的比较视图显示在同一界面中,以通过该不同迭代次数对应的比较视图查看同一客户端在不同迭代次数中的排列情况。需要说明的,对于同一迭代次数对应的比较视图,若比较视图含有该次迭代训练的所有指标数据,因此,可根据需要确定比较视图中各个客户端对应指标数据的排序情况,若当存在识别精度时,可根据识别精度从大到小对客户端进行排序,得到比较视图,从而通过该比较视图可以查看当前迭代训练过程中,各个客户端对应的识别精度的大小。Further, in the comparison view in this embodiment, the rectangle in each row represents a client, and the bars in different colors in the rectangle represent the values corresponding to each indicator data of the client, and the same indicator data bar corresponding to different clients The starting point of the shape is the same, so that the similarity between each indicator data can be determined by the ending point of the bar. The top row in the comparison view can be used to represent the federated learning server. Further, it is also possible to obtain comparison views corresponding to different iteration times, and then display the comparison views corresponding to different iteration times in the same interface, so as to view the arrangement of the same client in different iteration times through the comparison views corresponding to the different iteration times Condition. It should be noted that for the comparison view corresponding to the same iteration number, if the comparison view contains all the index data trained in this iteration, the order of the index data corresponding to each client in the comparison view can be determined as needed. If there is recognition accuracy At the time, the clients can be sorted according to the recognition accuracy from large to small to obtain a comparison view, so that the recognition accuracy corresponding to each client in the current iterative training process can be viewed through the comparison view.
进一步地,当确定横向联邦学习模型对应客户端的指标数据后,选定各类指标数据的目标指标,计算各个客户端指标数据与对应目标指标之间的相似度,此时相似度越大,在比较视图中的排名越靠前,相似度越小,在比较视图中的排名越靠后。具体地,可通过欧式距离或者余弦距离来计算各个客户端指标数据与对应目标指标之间的相似度。在比较视图中,相似度可通过曲线来表示。可以理解的是,若计算得到的相似度大于预设相似度,则说明对应的客户端在横向联邦学习模型迭代训练过程中发生了较大的变化;若计算得到相似度小于或者等于预设相似度,则说明对应的客户端在横向联邦学习模型迭代训练过程中属于正常变化,其中,预设相似度的大小可根据具体需要而设置,本实施例不限制预设相似度的大小。Further, when the indicator data of the client corresponding to the horizontal federated learning model is determined, the target indicators of various indicator data are selected, and the similarity between the indicator data of each client and the corresponding target indicator is calculated. At this time, the greater the similarity, the greater the The higher the ranking in the comparison view, the lower the similarity, and the lower the ranking in the comparison view. Specifically, Euclidean distance or cosine distance may be used to calculate the similarity between the index data of each client and the corresponding target index. In the comparison view, the similarity can be represented by a curve. It is understandable that if the calculated similarity is greater than the preset similarity, it means that the corresponding client has undergone major changes during the iterative training process of the horizontal federated learning model; if the calculated similarity is less than or equal to the preset similarity Degree means that the corresponding client is a normal change during the iterative training process of the horizontal federated learning model. The preset similarity can be set according to specific needs, and this embodiment does not limit the preset similarity.
需要说明的是,通过比较视图,可以确定迭代训练过程中,相对于其他正常波动客户端,存在明显波动的客户端,此时,可通过操作指令在比较视图中选择存在明显波动的客户端和正常波动的客户端对应的节点,从而对比这两个客户端,以查看这两个客户端对应的损失值和识别精度等运行数据之间的区别,以确定存在明显波动的客户端。进一步地,通过比较视图,也可以查看各个客户端的梯度变化情况是否偏离正常情况。由此可知,通过比较视图,可以确定横向联邦学习模型在迭代训练过程,异常的客户端。It should be noted that through the comparison view, it can be determined that during the iterative training process, compared with other normal fluctuation clients, there are clients with obvious fluctuations. At this time, you can select the clients with obvious fluctuations and the clients in the comparison view through operation instructions. The nodes corresponding to the clients with normal fluctuations are compared, and the two clients are compared to see the difference between the loss value and recognition accuracy of the two clients and the difference between the running data such as the recognition accuracy, so as to determine the clients with obvious fluctuations. Furthermore, by comparing the views, it is also possible to check whether the gradient change of each client deviates from the normal situation. It can be seen that by comparing the views, we can determine the abnormal clients in the iterative training process of the horizontal federated learning model.
进一步地,所述可视视图包括贡献度排序视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:Further, the visual view includes a contribution ranking view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
步骤i,确定客户端的运行数据在各次迭代训练中的排名顺序。Step i: Determine the ranking order of the running data of the client in each iteration of the training.
步骤j,将所述排名训练以盒须图的形式显示,以构建所述横向联邦学习模型对应的贡献度排序视图。Step j: Display the ranking training in the form of a box-and-whisker graph to construct a ranking view of contribution degrees corresponding to the horizontal federated learning model.
进一步地,当所需要构建的可视视图为贡献度排名视图,且获取到运行数据后,确定各客户端的运行数据在各次迭代训练过程中的排名顺序。当确定各个客户端的运行数据在各次迭代训练中的排名顺序后,将排名顺序以盒须图的形式显示,以构建横向联邦学习模型对应的贡献度排序视图,需要说明的是,在贡献度排序视图中,可按照排名顺序从小到大排序,也可按照排名顺序从大到小排序。具体地,在贡献度排名视图中,可按照各个客户端最低排名、最高排名、中位排名与参与的迭代次数对客户端进行排序,如确定某个客户端在所参与的迭代次数中,有几次的运行数据的排名最高,有几次的运行数据排名最低,以及有几次的运行数据排名排在中间。需要说明的是,一个客户端并不一定会参与横向联邦学习模型的所有迭代次数,如横向联邦学习模型的迭代次数一共为100次,某个客户端可能只参与了其中65次。当在某次迭代训练过程中,该客户端的其中一个运行数据排名最高,可确定在当次迭代训练过程中,客户端存在1次最高排名。可以理解的是,对于同一个运行数据,根据排名顺序即可确定对应的贡献度,如某个运行数据排名最高,可根据该运行数据的性质确定该运行数据对横向联邦学习模型的贡献度最大或者最小。Further, when the visual view to be constructed is the contribution ranking view, and the running data is obtained, the ranking order of the running data of each client during each iteration of the training process is determined. After determining the ranking order of the running data of each client in each iteration of the training, the ranking order is displayed in the form of a box and whisker diagram to construct a ranking view of the contribution degree corresponding to the horizontal federated learning model. It should be noted that in the contribution degree In the sorting view, you can sort from smallest to largest according to the ranking order, or from largest to smallest according to the ranking order. Specifically, in the contribution ranking view, the clients can be sorted according to the lowest ranking, highest ranking, median ranking, and number of iterations of each client. For example, it is determined that a certain client is Several running data ranks the highest, several running data ranks the lowest, and several running data ranks in the middle. It should be noted that a client does not necessarily participate in all iterations of the horizontal federated learning model. For example, the total number of iterations of the horizontal federated learning model is 100, and a client may only participate in 65 of them. When one of the running data of the client has the highest ranking during a certain iterative training process, it can be determined that the client has the highest ranking once in the current iterative training process. It is understandable that for the same operating data, the corresponding contribution can be determined according to the ranking order. For example, if a certain operating data ranks the highest, it can be determined according to the nature of the operating data that the operating data has the largest contribution to the horizontal federated learning model Or the smallest.
进一步地,比较视图中的排名也会影响贡献度排序视图的排名。如当在比较视图中的选择损失值进行排序时,每个客户端在每一轮就会根据损失值得到一个排名,这样每一个客户端在每一轮都有一个排名,用盒须图来表示这个客户端的排名分布,展示在贡献排序视图中,这时,贡献排序视图展示的用户选择的属性是损失值的时候的贡献度排序。Further, the ranking in the comparison view will also affect the ranking of the contribution ranking view. For example, when selecting the loss value in the comparison view for sorting, each client will get a ranking according to the loss value in each round, so that each client has a ranking in each round, using box-and-whisker plots Indicates the ranking distribution of this client, displayed in the contribution ranking view. At this time, the attribute selected by the user displayed in the contribution ranking view is the contribution ranking when the loss value is lost.
需要说明的是,贡献度排名视图利用盒须图的设计,展示所有客户端在横向联邦学习模型迭代训练过程中的参与情况,并按降序或者升序进行排序。就像在联合学习中一样,客户端的本地数据对联邦学习服务器是完全不可见的,通过不同运行数据的排名,可以了解客户端对横向联邦学习模型的贡献。其中,丢失率和识别精度可能反映每个客户端的训练数据的质量,训练数据的数量代表数据的贡献,丢失率表示客户端所提供的待训练样本数据中无用样本数据占其所提供的总待训练样本数据的比例。可以理解的是,通过使用不同的运行数据对客户端进行排名,可以确定存在异常的客户端的运行数据在各次迭代训练过程中,并不是都排在最后,因此在横向联邦学习模型迭代训练过程,允许客户端的异常只是会在其中几次迭代训练过程中出现,然而在大部分迭代训练过程中,客户端都是正常。It should be noted that the contribution ranking view uses the box-and-whisker chart design to display the participation of all clients in the iterative training process of the horizontal federated learning model, and is sorted in descending or ascending order. Just like in joint learning, the local data of the client is completely invisible to the federated learning server. Through the ranking of different running data, the contribution of the client to the horizontal federated learning model can be understood. Among them, the loss rate and recognition accuracy may reflect the quality of each client's training data, the amount of training data represents the contribution of the data, and the loss rate indicates that the useless sample data in the sample data to be trained provided by the client accounts for the total waiting time provided by it. The proportion of training sample data. It is understandable that by using different running data to rank clients, it can be determined that the running data of abnormal clients are not all ranked last in each iteration of the training process. Therefore, in the horizontal federated learning model iterative training process , The exception that allows the client to appear only during a few iterations of the training process, but in most of the iterative training process, the client is normal.
具体地,参照图5,图5是本申请实施例中贡献度排名视图的一种示意图,在图5中,y(竖)轴为客户端的客户端标识,x(横)轴为排名分布,图5为各个客户端在各次迭代训练过程中,最小值的运行数据的排名分布。由图5可知,各个客户端对应的矩形框的长度越长,表明其运行数据中在横向联邦学习模型迭代训练过程中,存在的最小值越多。Specifically, referring to Fig. 5, Fig. 5 is a schematic diagram of a contribution ranking view in an embodiment of the present application. In Fig. 5, the y (vertical) axis is the client identification of the client, and the x (horizontal) axis is the ranking distribution. Figure 5 shows the ranking distribution of the minimum running data of each client during each iteration of the training process. It can be seen from Figure 5 that the longer the length of the rectangular box corresponding to each client, the more the minimum values exist in the iterative training process of the horizontal federated learning model in its running data.
可以理解的是,现有的可视化分析工具如Turbofan tycoon或Fate-Board 可以用来传达联邦学习模型的优势,Turbofan tycoon或Fate-Board 等可视化分析工具通过总结联邦学习过程所产生的日志和性能指标数据,帮助促进联邦学习模型的分析和改进。然而,深入的分析是缺乏的,诸如分析潜在的客户端异常和贡献评估等细粒度是具有挑战性的,例如,在横向联邦学习模型训练过程中,隐私保护机制的设计会阻碍许多基本的操作。如果不能进行有效的分析为后续的优化调整提供支持,将会影响整个横向联邦学习模型训练的效果,即导致训练所得的横向联邦学习模型识别数据的准确率低下。而本实施例通过构建不同的可视视图,即构建比较视图、摘要视图、投影视图和贡献度排序视图等,通过不同的可视视图,从不同维度分析在横向联邦学习模型进行迭代训练过程中,各个客户端的运行情况,及时发现各个客户端的异常情况,然后及时调整横向联邦学习模型的训练过程,从而进一步提高了训练所得的横向联邦学习模型识别数据的准确率。It is understandable that the existing visual analysis tools such as Turbofan tycoon or Fate-Board can be used to convey the advantages of the federated learning model. Turbofan Visual analysis tools such as tycoon or Fate-Board help to promote the analysis and improvement of the federated learning model by summarizing the logs and performance index data generated by the federated learning process. However, in-depth analysis is lacking. Fine-grained analysis such as analysis of potential client anomalies and contribution evaluation is challenging. For example, in the training process of horizontal federated learning models, the design of privacy protection mechanisms will hinder many basic operations. . If effective analysis is not performed to provide support for subsequent optimization and adjustment, it will affect the effect of the entire horizontal federated learning model training, that is, the accuracy of the recognition data of the horizontal federated learning model obtained by training will be low. In this embodiment, by constructing different visual views, that is, constructing a comparison view, a summary view, a projection view, and a contribution ranking view, etc., through different visual views, analyzes from different dimensions during the iterative training process of the horizontal federated learning model. , The operating conditions of each client, discover the abnormal conditions of each client in time, and then adjust the training process of the horizontal federated learning model in time, thereby further improving the accuracy of the recognition data of the trained horizontal federated learning model.
进一步地,提出本申请基于联邦学习模型的视图显示方法第三实施例。所述基于联邦学习模型的视图显示方法第三实施例与所述基于联邦学习模型的视图显示方法第一和/或第二实施例的区别在于,所述基于联邦学习模型的视图显示方法还包括:Further, a third embodiment of the view display method based on the federated learning model of this application is proposed. The difference between the third embodiment of the view display method based on the federated learning model and the first and/or the second embodiment of the view display method based on the federated learning model is that the view display method based on the federated learning model further includes :
步骤k,检测是否接收到操作所述可视视图的操作指令。Step k, detecting whether an operation instruction to operate the visual view is received.
若接收到所述操作指令,则所述根据所述训练进程确定所述可视视图中显示的内容的步骤包括:If the operation instruction is received, the step of determining the content displayed in the visual view according to the training process includes:
步骤l,根据所述操作指令和所述训练进程确定所述可视视图中显示的内容。Step 1. Determine the content displayed in the visual view according to the operation instruction and the training process.
当创建得到可视视图后,检测是否接收到操作可视视图的操作指令,其中,该操作指令为用户根据具体需要而出发的。当接收到操作指令后,根据该操作指令和训练进程控制可视视图中显示的内容;当未接收到操作指令后,继续检测是否接收到操作可视视图的操作指令。如用户可通过操作指令在投影视图中选择某个节点,然后,摘要视图、概览视图、比较视图和贡献度排名视图中会显示当前训练进程中,所选择节点对应的相关数据;如当存在多次迭代训练对应的比较视图,且每个比较视图中存在多个客户端对应的运行数据时,当在其中一个比较视图中选择某一客户端时,即在其中一个比较视图中点击某个客户端对应的矩形时,会在其他比较视图中区别显示该客户端对应的相关数据,如将其他比较视图中该客户端对应的相关数据高亮显示。After the visual view is created, it is detected whether an operation instruction for operating the visual view is received, where the operation instruction is set out by the user according to specific needs. After receiving the operation instruction, control the content displayed in the visual view according to the operation instruction and the training process; when the operation instruction is not received, continue to detect whether an operation instruction to operate the visual view is received. For example, the user can select a node in the projection view by operating instructions, and then the summary view, overview view, comparison view, and contribution ranking view will display the relevant data corresponding to the selected node in the current training process; When the corresponding comparison view is trained for the second iteration, and there are multiple client running data in each comparison view, when a client is selected in one of the comparison views, that is, a customer is clicked in one of the comparison views When the rectangle corresponds to the client, the relevant data corresponding to the client will be displayed in other comparison views. For example, the relevant data corresponding to the client in the other comparison views will be highlighted.
本实施例通过根据操作指令和训练进程控制可视视图中显示的内容,从而实现了根据用户需求进行相关内容的显示,提高了可视视图显示内容的智能性。进一步地,本申请实施例可通过摘要视图、投影视图、概览视图、比较视图和贡献度排名视图等可视视图确定在横向联邦学习模型迭代训练过程中,各个客户端的整体运行状态,以及各个客户端之间的运行数据的关联情况,从而根据可视视图检测横向联邦学习模型迭代训练过程中,存在的异常情况和各个客户端对横向联邦学习模型的贡献情况。In this embodiment, by controlling the content displayed in the visual view according to the operation instruction and the training process, the display of related content according to the user's requirement is realized, and the intelligence of the display content of the visual view is improved. Further, the embodiment of the present application can determine the overall operating status of each client during the iterative training process of the horizontal federated learning model and the overall operating status of each client through visual views such as summary view, projection view, overview view, comparison view, and contribution ranking view. The correlation of the running data between the terminals, so as to detect the abnormal situation in the iterative training process of the horizontal federated learning model and the contribution of each client to the horizontal federated learning model according to the visual view.
此外,本申请还提供一种基于联邦学习模型的视图显示装置,参照图6,所述基于联邦学习模型的视图显示装置包括:In addition, the present application also provides a view display device based on a federated learning model. Referring to FIG. 6, the view display device based on a federated learning model includes:
获取模块10,用于获取横向联邦学习模型迭代训练过程中,所述横向联邦学习模型对应各客户端的运行数据;The obtaining module 10 is configured to obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model;
构建模块20,用于根据所述运行数据构建所述横向联邦学习模型对应的可视视图;The construction module 20 is configured to construct a visual view corresponding to the horizontal federated learning model according to the operating data;
确定模块30,用于确定所述横向联邦学习模型的训练进程;根据所述训练进程确定所述可视视图中显示的内容。The determining module 30 is configured to determine the training process of the horizontal federated learning model; and determine the content displayed in the visual view according to the training process.
进一步地,所述运行数据至少包括以下一种:客户端标识、各次迭代训练的开始时间戳、客户端对应的训练样本数量、本地模型对应的损失值、各客户端通过本地数据训练本地模型的开始时间点和结束时间点,所述可视视图包括概览视图;Further, the operating data includes at least one of the following: client identification, the start timestamp of each iteration of training, the number of training samples corresponding to the client, the loss value corresponding to the local model, and the local model trained by each client through local data The start time point and the end time point of, the visual view includes an overview view;
所述构建模块20包括:The building module 20 includes:
编码单元,用于对所述运行数据进行可视化编码,得到可视化后的运行数据;The coding unit is used to perform visual coding on the operating data to obtain the visualized operating data;
第一构建单元,用于根据可视化后的运行数据构建所述横向联邦学习模型对应的概览视图。The first construction unit is used to construct an overview view corresponding to the horizontal federated learning model according to the visualized operating data.
进一步地,所述可视视图包括投影视图,所述构建模块20还包括:Further, the visual view includes a projection view, and the construction module 20 further includes:
第一确定单元,用于根据所述运行数据确定各客户端对应的指标数据;The first determining unit is configured to determine index data corresponding to each client terminal according to the operating data;
第二构建单元,用于根据所述指标数据构建所述横向联邦学习模型对应的投影视图,其中,所述投影视图中的各个节点分别表示客户端标识和迭代次数之间的映射关系。The second construction unit is configured to construct a projection view corresponding to the horizontal federated learning model according to the index data, wherein each node in the projection view respectively represents a mapping relationship between a client identifier and the number of iterations.
进一步地,所述可视视图包括摘要视图,所述构建模块20还包括:Further, the visual view includes a summary view, and the construction module 20 further includes:
第二确定单元,确定所述运行数据对应的统计数据,其中,所述统计数据至少包括以下一种:所述横向联邦学习模型对应客户端的客户端数量、迭代次数、训练所述横向联邦学习模型的待训练样本数的变化数量、所述横向联邦学习模型对应的损失值对应的减少值和各客户端对应本地模型的识别精度的增长值;The second determining unit determines statistical data corresponding to the operating data, where the statistical data includes at least one of the following: the number of clients corresponding to the horizontal federated learning model, the number of iterations, and training the horizontal federated learning model The number of changes in the number of samples to be trained, the reduction value corresponding to the loss value corresponding to the horizontal federated learning model, and the increase value of the recognition accuracy of the local model corresponding to each client;
第三构建单元,用于根据所述统计数据构建所述横向联邦学习模型对应的摘要视图。The third construction unit is configured to construct a summary view corresponding to the horizontal federated learning model according to the statistical data.
进一步地,所述可视视图包括比较视图,所述构建模块20还包括:Further, the visual view includes a comparison view, and the construction module 20 further includes:
第三确定单元,用于根据所述运行数据确定各客户端对应的指标数据,并在所述指标数据中确定所述横向联邦学习模型最后一次迭代训练对应的目标指标;The third determining unit is configured to determine the indicator data corresponding to each client according to the operating data, and determine the target indicator corresponding to the last iterative training of the horizontal federated learning model in the indicator data;
第四构建单元,用于根据所述目标指标构建所述横向联邦学习模型对应的比较视图。The fourth construction unit is used to construct a comparison view corresponding to the horizontal federated learning model according to the target index.
进一步地,所述可视视图包括贡献度排序视图,所述构建模块20还包括:Further, the visual view includes a contribution ranking view, and the construction module 20 further includes:
第四确定单元,用于确定客户端的运行数据在各次迭代训练中的排名顺序;The fourth determining unit is used to determine the ranking order of the running data of the client in each iteration of the training;
显示单元,用于将所述排名训练以盒须图的形式显示,以构建所述横向联邦学习模型对应的贡献度排序视图。The display unit is configured to display the ranking training in the form of a box-and-whisker graph to construct a ranking view of contribution degrees corresponding to the horizontal federated learning model.
进一步地,所述基于联邦学习模型的视图显示装置还包括:Further, the view display device based on the federated learning model further includes:
检测模块,用于检测是否接收到操作所述可视视图的操作指令;The detection module is used to detect whether an operation instruction to operate the visual view is received;
所述确定模块30还用于若接收到所述操作指令,则根据所述操作指令和所述训练进程确定所述可视视图中显示的内容。The determination module 30 is further configured to determine the content displayed in the visual view according to the operation instruction and the training process if the operation instruction is received.
本申请基于联邦学习模型的视图显示装置具体实施方式与上述基于联邦学习模型的视图显示方法各实施例基本相同,在此不再赘述。The specific implementation of the view display device based on the federated learning model of the present application is basically the same as the foregoing embodiments of the view display method based on the federated learning model, and will not be repeated here.
此外,本申请还提供一种基于联邦学习模型的视图显示设备。如图7所示,图7是本申请实施例方案涉及的硬件运行环境的结构示意图。In addition, this application also provides a view display device based on the federated learning model. As shown in FIG. 7, FIG. 7 is a schematic structural diagram of the hardware operating environment involved in the solution of the embodiment of the present application.
需要说明的是,图7即可为基于联邦学习模型的视图显示设备的硬件运行环境的结构示意图。本申请实施例基于联邦学习模型的视图显示设备可以是PC,便携计算机等终端设备。It should be noted that FIG. 7 can be a structural schematic diagram of the hardware operating environment of the display device based on the federated learning model. The view display device based on the federated learning model in the embodiment of the present application may be a terminal device such as a PC and a portable computer.
如图7所示,该基于联邦学习模型的视图显示设备可以包括:处理器1001,例如CPU,存储器1005,用户接口1003,网络接口1004,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 7, the view display device based on the federated learning model may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图7中示出的基于联邦学习模型的视图显示设备结构并不构成对基于联邦学习模型的视图显示设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the view display device based on the federated learning model shown in FIG. 7 does not constitute a limitation on the view display device based on the federated learning model, and may include more or less components than shown in the figure. Or some parts are combined, or different parts are arranged.
如图7所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及基于联邦学习模型的视图显示程序。其中,操作系统是管理和控制基于联邦学习模型的视图显示设备硬件和软件资源的程序,支持基于联邦学习模型的视图显示程序以及其它软件或程序的运行。As shown in FIG. 7, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a view display program based on a federated learning model. Among them, the operating system is a program that manages and controls the hardware and software resources of the view display device based on the federated learning model, and supports the running of the view display program based on the federated learning model and other software or programs.
在图7所示的基于联邦学习模型的视图显示设备中,用户接口1003主要用于连接终端设备,与终端设备进行数据通信,如接收终端设备发送的待识别图像或者待训练图像;网络接口1004主要用于后台服务器,与后台服务器进行数据通信;处理器1001可以用于调用存储器1005中存储的基于联邦学习模型的视图显示程序,并执行如上所述的基于联邦学习模型的视图显示方法的步骤。In the view display device based on the federated learning model shown in FIG. 7, the user interface 1003 is mainly used to connect to the terminal device and perform data communication with the terminal device, such as receiving the image to be recognized or the image to be trained sent by the terminal device; the network interface 1004 Mainly used for back-end server to communicate with back-end server; the processor 1001 can be used to call the view display program based on the federated learning model stored in the memory 1005, and execute the steps of the view display method based on the federated learning model as described above .
本申请基于联邦学习模型的视图显示设备具体实施方式与上述基于联邦学习模型的视图显示方法各实施例基本相同,在此不再赘述。The specific implementation of the view display device based on the federated learning model of the present application is basically the same as the foregoing embodiments of the view display method based on the federated learning model, and will not be repeated here.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如上所述的基于联邦学习模型的视图显示方法的步骤。In addition, an embodiment of the present application also proposes a computer-readable storage medium that stores a view display program based on a federated learning model when the view display program based on a federated learning model is executed by a processor Implement the steps of the view display method based on the federated learning model as described above.
本申请计算机可读存储介质具体实施方式与上述基于联邦学习模型的视图显示方法各实施例基本相同,在此不再赘述。The specific implementation of the computer-readable storage medium of the present application is basically the same as the foregoing embodiments of the view display method based on the federated learning model, and will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority or inferiority of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种基于联邦学习模型的视图显示方法,其中,所述基于联邦学习模型的视图显示方法包括以下步骤:A view display method based on a federated learning model, wherein the view display method based on a federated learning model includes the following steps:
    获取横向联邦学习模型迭代训练过程中,所述横向联邦学习模型对应各客户端的运行数据;Acquiring the running data of each client during the iterative training process of the horizontal federated learning model;
    根据所述运行数据构建所述横向联邦学习模型对应的可视视图,并确定所述横向联邦学习模型的训练进程;Construct a visual view corresponding to the horizontal federated learning model according to the operating data, and determine the training process of the horizontal federated learning model;
    根据所述训练进程确定所述可视视图中显示的内容。The content displayed in the visual view is determined according to the training process.
  2. 如权利要求1所述的基于联邦学习模型的视图显示方法,其中,所述运行数据至少包括以下一种:客户端标识、各次迭代训练的开始时间戳、客户端对应的训练样本数量、本地模型对应的损失值、各客户端通过本地数据训练本地模型的开始时间点和结束时间点,所述可视视图包括概览视图;The view display method based on the federated learning model according to claim 1, wherein the operating data includes at least one of the following: client identification, start timestamp of each iteration of training, the number of training samples corresponding to the client, and local The loss value corresponding to the model, the start time point and the end time point at which each client trains the local model through local data, and the visual view includes an overview view;
    所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:The step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data includes:
    对所述运行数据进行可视化编码,得到可视化后的运行数据;Performing visual coding on the operating data to obtain visualized operating data;
    根据可视化后的运行数据构建所述横向联邦学习模型对应的概览视图。An overview view corresponding to the horizontal federated learning model is constructed according to the visualized operating data.
  3. 如权利要求1所述的基于联邦学习模型的视图显示方法,其中,所述可视视图包括投影视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:The view display method based on the federated learning model according to claim 1, wherein the visual view comprises a projection view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data comprises:
    根据所述运行数据确定各客户端对应的指标数据;Determine the indicator data corresponding to each client according to the operating data;
    根据所述指标数据构建所述横向联邦学习模型对应的投影视图,其中,所述投影视图中的各个节点分别表示客户端标识和迭代次数之间的映射关系。Construct a projection view corresponding to the horizontal federated learning model according to the indicator data, wherein each node in the projection view respectively represents a mapping relationship between a client identifier and the number of iterations.
  4. 如权利要求1所述的基于联邦学习模型的视图显示方法,其中,所述可视视图包括摘要视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:The view display method based on the federated learning model according to claim 1, wherein the visual view comprises a summary view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data comprises:
    确定所述运行数据对应的统计数据,其中,所述统计数据至少包括以下一种:所述横向联邦学习模型对应客户端的客户端数量、迭代次数、训练所述横向联邦学习模型的待训练样本数的变化数量、所述横向联邦学习模型对应的损失值对应的减少值和各客户端对应本地模型的识别精度的增长值;Determine the statistical data corresponding to the operating data, where the statistical data includes at least one of the following: the number of clients corresponding to the horizontal federated learning model, the number of iterations, and the number of samples to be trained for training the horizontal federated learning model The number of changes in the, the reduction value corresponding to the loss value corresponding to the horizontal federated learning model, and the increase value of the recognition accuracy of the local model corresponding to each client;
    根据所述统计数据构建所述横向联邦学习模型对应的摘要视图。Construct a summary view corresponding to the horizontal federated learning model according to the statistical data.
  5. 如权利要求4所述的基于联邦学习模型的视图显示方法,其中,所述根据所述统计数据构建所述横向联邦学习模型对应的摘要视图的步骤包括:The view display method based on the federated learning model according to claim 4, wherein the step of constructing a summary view corresponding to the horizontal federated learning model according to the statistical data comprises:
    根据所述统计数据,以横向联邦学习模型对应的迭代次数为横坐标,对应的统计数据为纵坐标,构建出横向联邦学习模型对应的各个统计数据的摘要视图。According to the statistical data, the number of iterations corresponding to the horizontal federated learning model is taken as the abscissa and the corresponding statistical data is taken as the ordinate to construct a summary view of each statistical data corresponding to the horizontal federated learning model.
  6. 如权利要求1所述的基于联邦学习模型的视图显示方法,其中,所述可视视图包括比较视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:The view display method based on a federated learning model according to claim 1, wherein the visual view comprises a comparison view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data comprises:
    根据所述运行数据确定各客户端对应的指标数据,并在所述指标数据中确定所述横向联邦学习模型最后一次迭代训练对应的目标指标;Determine the indicator data corresponding to each client according to the operating data, and determine the target indicator corresponding to the last iterative training of the horizontal federated learning model in the indicator data;
    根据所述目标指标构建所述横向联邦学习模型对应的比较视图。Construct a comparison view corresponding to the horizontal federated learning model according to the target index.
  7. 如权利要求6所述的基于联邦学习模型的视图显示方法,其中,所述根据所述目标指标构建所述横向联邦学习模型对应的比较视图的步骤包括:7. The view display method based on a federated learning model according to claim 6, wherein the step of constructing a comparison view corresponding to the horizontal federated learning model according to the target index comprises:
    获取同一迭代训练过程中,联邦学习网络结构中相邻客户端对应的目标指标,根据该相邻客户端对应的目标指标构建对应的比较视图。In the same iterative training process, the target index corresponding to the neighboring client in the federated learning network structure is obtained, and the corresponding comparison view is constructed according to the target index corresponding to the neighboring client.
  8. 如权利要求1所述的基于联邦学习模型的视图显示方法,其中,所述可视视图包括贡献度排序视图,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图的步骤包括:The view display method based on the federated learning model according to claim 1, wherein the visual view includes a contribution ranking view, and the step of constructing a visual view corresponding to the horizontal federated learning model according to the operating data include:
    确定客户端的运行数据在各次迭代训练中的排名顺序;Determine the ranking order of the client's running data in each iteration of the training;
    将所述排名训练以盒须图的形式显示,以构建所述横向联邦学习模型对应的贡献度排序视图。The ranking training is displayed in the form of a box-and-whisker graph to construct a contribution ranking view corresponding to the horizontal federated learning model.
  9. 如权利要求1至8任一项所述的基于联邦学习模型的视图显示方法,其中,所述根据所述运行数据构建所述横向联邦学习模型对应的可视视图,并确定所述横向联邦学习模型的训练进程的步骤之后,还包括:The view display method based on a federated learning model according to any one of claims 1 to 8, wherein the visual view corresponding to the lateral federated learning model is constructed according to the operating data, and the lateral federated learning is determined After the steps of the model training process, it also includes:
    检测是否接收到操作所述可视视图的操作指令;Detecting whether an operation instruction to operate the visual view is received;
    若接收到所述操作指令,则所述根据所述训练进程确定所述可视视图中显示的内容的步骤包括:If the operation instruction is received, the step of determining the content displayed in the visual view according to the training process includes:
    根据所述操作指令和所述训练进程确定所述可视视图中显示的内容。The content displayed in the visual view is determined according to the operation instruction and the training process.
  10. 一种基于联邦学习模型的视图显示装置,其中,所述基于联邦学习模型的视图显示装置包括:A view display device based on a federated learning model, wherein the view display device based on a federated learning model includes:
    获取模块,用于获取横向联邦学习模型迭代训练过程中,所述横向联邦学习模型对应各客户端的运行数据;An obtaining module, which is used to obtain the running data of each client corresponding to the horizontal federated learning model during the iterative training process of the horizontal federated learning model;
    构建模块,用于根据所述运行数据构建所述横向联邦学习模型对应的可视视图;A building module for building a visual view corresponding to the horizontal federated learning model according to the operating data;
    确定模块,用于确定所述横向联邦学习模型的训练进程;根据所述训练进程确定所述可视视图中显示的内容。The determining module is used for determining the training process of the horizontal federated learning model; and determining the content displayed in the visual view according to the training process.
  11. 一种基于联邦学习模型的视图显示设备,其中,所述基于联邦学习模型的视图显示设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被所述处理器执行时实现如权利要求1所述的基于联邦学习模型的视图显示方法的步骤。A view display device based on a federated learning model, wherein the view display device based on a federated learning model includes a memory, a processor, and a federated learning model-based device that is stored in the memory and can run on the processor. A view display program, which implements the steps of the view display method based on the federated learning model according to claim 1 when the view display program based on the federated learning model is executed by the processor.
  12. 一种基于联邦学习模型的视图显示设备,其中,所述基于联邦学习模型的视图显示设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被所述处理器执行时实现如权利要求2所述的基于联邦学习模型的视图显示方法的步骤。A view display device based on a federated learning model, wherein the view display device based on a federated learning model includes a memory, a processor, and a federated learning model-based device that is stored in the memory and can run on the processor. A view display program, when the view display program based on the federated learning model is executed by the processor, the steps of the view display method based on the federated learning model as claimed in claim 2 are implemented.
  13. 一种基于联邦学习模型的视图显示设备,其中,所述基于联邦学习模型的视图显示设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被所述处理器执行时实现如权利要求3所述的基于联邦学习模型的视图显示方法的步骤。A view display device based on a federated learning model, wherein the view display device based on a federated learning model includes a memory, a processor, and a federated learning model-based device that is stored in the memory and can run on the processor. A view display program, when the view display program based on the federated learning model is executed by the processor, the steps of the view display method based on the federated learning model according to claim 3 are implemented.
  14. 一种基于联邦学习模型的视图显示设备,其中,所述基于联邦学习模型的视图显示设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被所述处理器执行时实现如权利要求4所述的基于联邦学习模型的视图显示方法的步骤。A view display device based on a federated learning model, wherein the view display device based on a federated learning model includes a memory, a processor, and a federated learning model-based device that is stored in the memory and can run on the processor. A view display program, when the view display program based on the federated learning model is executed by the processor, the steps of the view display method based on the federated learning model according to claim 4 are implemented.
  15. 一种基于联邦学习模型的视图显示设备,其中,所述基于联邦学习模型的视图显示设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被所述处理器执行时实现如权利要求6所述的基于联邦学习模型的视图显示方法的步骤。A view display device based on a federated learning model, wherein the view display device based on a federated learning model includes a memory, a processor, and a federated learning model-based device that is stored in the memory and can run on the processor. A view display program, which implements the steps of the view display method based on the federated learning model according to claim 6 when the view display program based on the federated learning model is executed by the processor.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如权利要求1所述的基于联邦学习模型的视图显示方法的步骤。A computer-readable storage medium, wherein a view display program based on a federated learning model is stored on the computer-readable storage medium, and the view display program based on a federated learning model is executed by a processor as described in claim 1. The steps of the view display method based on the federated learning model are described.
  17. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如权利要求2所述的基于联邦学习模型的视图显示方法的步骤。A computer-readable storage medium, wherein a view display program based on a federated learning model is stored on the computer-readable storage medium, and the view display program based on a federated learning model is executed by a processor to realize The steps of the view display method based on the federated learning model are described.
  18. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如权利要求3所述的基于联邦学习模型的视图显示方法的步骤。A computer-readable storage medium, wherein a view display program based on a federated learning model is stored on the computer-readable storage medium, and when the view display program based on a federated learning model is executed by a processor, the implementation is as described in claim 3. The steps of the view display method based on the federated learning model are described.
  19. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如权利要求4所述的基于联邦学习模型的视图显示方法的步骤。A computer-readable storage medium, wherein a view display program based on a federated learning model is stored on the computer-readable storage medium, and when the view display program based on a federated learning model is executed by a processor, the implementation is as described in claim 4 The steps of the view display method based on the federated learning model are described.
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有基于联邦学习模型的视图显示程序,所述基于联邦学习模型的视图显示程序被处理器执行时实现如权利要求6所述的基于联邦学习模型的视图显示方法的步骤。A computer-readable storage medium, wherein a view display program based on a federated learning model is stored on the computer-readable storage medium, and when the view display program based on a federated learning model is executed by a processor, the implementation is as described in claim 6 The steps of the view display method based on the federated learning model are described.
PCT/CN2021/090983 2020-04-30 2021-04-29 Federated learning model-based view display method, apparatus and device, and medium WO2021219080A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010370699.6 2020-04-30
CN202010370699.6A CN111553485A (en) 2020-04-30 2020-04-30 View display method, device, equipment and medium based on federal learning model

Publications (1)

Publication Number Publication Date
WO2021219080A1 true WO2021219080A1 (en) 2021-11-04

Family

ID=72002664

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/090983 WO2021219080A1 (en) 2020-04-30 2021-04-29 Federated learning model-based view display method, apparatus and device, and medium

Country Status (2)

Country Link
CN (1) CN111553485A (en)
WO (1) WO2021219080A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189899A (en) * 2021-12-10 2022-03-15 东南大学 User equipment selection method based on random aggregation beam forming
CN115391734A (en) * 2022-10-11 2022-11-25 广州天维信息技术股份有限公司 Client satisfaction analysis system based on federal learning

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553485A (en) * 2020-04-30 2020-08-18 深圳前海微众银行股份有限公司 View display method, device, equipment and medium based on federal learning model
CN111950651B (en) * 2020-08-21 2024-02-09 中国科学院计算机网络信息中心 High-dimensional data processing method and device
CN112416887B (en) * 2020-11-18 2024-01-30 脸萌有限公司 Information interaction method and device and electronic equipment
CN113723619A (en) * 2021-08-31 2021-11-30 南京大学 Federal learning training method based on training phase perception strategy
CN114281231B (en) * 2021-10-12 2023-10-20 腾讯科技(深圳)有限公司 Information presentation method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153475A1 (en) * 2009-12-18 2011-06-23 At&T Intellectual Property I, L.P. Federal adjustment tracking system
CN110825476A (en) * 2019-10-31 2020-02-21 深圳前海微众银行股份有限公司 Display method, device, terminal and medium for federal learning workflow interface
CN110874648A (en) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 Federal model training method and system and electronic equipment
CN111553485A (en) * 2020-04-30 2020-08-18 深圳前海微众银行股份有限公司 View display method, device, equipment and medium based on federal learning model

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120278659A1 (en) * 2011-04-27 2012-11-01 Microsoft Corporation Analyzing Program Execution
CN108268362A (en) * 2018-02-27 2018-07-10 郑州云海信息技术有限公司 A kind of method and device that curve graph is drawn under NVcaffe frames
CN111078725B (en) * 2019-12-13 2022-07-12 浙江大学 Visual query method and device for multi-data-source combined data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153475A1 (en) * 2009-12-18 2011-06-23 At&T Intellectual Property I, L.P. Federal adjustment tracking system
CN110825476A (en) * 2019-10-31 2020-02-21 深圳前海微众银行股份有限公司 Display method, device, terminal and medium for federal learning workflow interface
CN110874648A (en) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 Federal model training method and system and electronic equipment
CN111553485A (en) * 2020-04-30 2020-08-18 深圳前海微众银行股份有限公司 View display method, device, equipment and medium based on federal learning model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PAN, RUSHENG ET AL.: "Visualization for Federated Learning: Challenges and Framework", JOURNAL OF COMPUTER-AIDED DESIGN & COMPUTER GRAPHICS, vol. 32, no. 4, 14 January 2020 (2020-01-14), pages 513 - 519, XP055862690 *
WEI XIGUANG, LI QUAN, LIU YANG, YU HAN, CHEN TIANJIAN, YANG QIANG: "Multi-Agent Visualization for Explaining Federated Learning", PROCEEDINGS OF THE TWENTY-EIGHTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 1 August 2019 (2019-08-01) - 16 August 2019 (2019-08-16), California , pages 6572 - 6574, XP055862693, ISBN: 978-0-9992411-4-1, DOI: 10.24963/ijcai.2019/960 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189899A (en) * 2021-12-10 2022-03-15 东南大学 User equipment selection method based on random aggregation beam forming
CN115391734A (en) * 2022-10-11 2022-11-25 广州天维信息技术股份有限公司 Client satisfaction analysis system based on federal learning

Also Published As

Publication number Publication date
CN111553485A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
WO2021219080A1 (en) Federated learning model-based view display method, apparatus and device, and medium
Zhang et al. Crowdlearn: A crowd-ai hybrid system for deep learning-based damage assessment applications
WO2020029689A1 (en) Data processing model construction method and device, server and client
US10192001B2 (en) Visualizing convolutional neural networks
US10048826B2 (en) Interactive visualizations of a convolutional neural network
US9934462B1 (en) Visualizing deep neural networks
US20180365557A1 (en) Information processing method and information processing apparatus
JP5373870B2 (en) Prediction device, prediction method, and program
TW201807624A (en) Diagnostic engine and classifier for discovery of behavioral and other clusters relating to entity relationships to enhance derandomized entity behavior identification and classification
US10748166B2 (en) Method and system for mining churn factor causing user churn for network application
EP3596670A1 (en) Automated decision making using staged machine learning
CN111401722B (en) Intelligent decision method and intelligent decision system
US11715046B2 (en) Enhancing data-analytic visualizations with machine learning
US20150379112A1 (en) Creating an on-line job function ontology
CN110322143B (en) Model materialization management method, device, equipment and computer storage medium
US10489416B2 (en) Optimizing and managing execution of hybrid flows
WO2014054231A1 (en) Information system construction assistance device, information system construction assistance method, and storage medium
JP2020198080A (en) System and method including a plurality of sensors monitoring one or more processes and providing sensor data
Christensen et al. Lightweight and continuous architectural software quality assurance using the asqa technique
Rui et al. Context-based intelligent scheduling and knowledge push algorithms for ar-assist communication network maintenance
US11782923B2 (en) Optimizing breakeven points for enhancing system performance
JP5206268B2 (en) Rule creation program, rule creation method and rule creation device
CN113377683B (en) Software test case generation method, system, device, terminal, medium and application
CN113420165B (en) Training of classification model and classification method and device of multimedia data
Lockhart et al. Scission: Context-aware and performance-driven edge-based distributed deep neural networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21795473

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21795473

Country of ref document: EP

Kind code of ref document: A1