Explanation device, explanation method, and program

WO2025074464A1PCT designated stage expired Publication Date: 2025-04-10NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/035863
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-10-02
Publication Date
2025-04-10

AI Technical Summary

Technical Problem

The prior art is difficult to explain why in the generated vehicle route optimization solutions, the selection of certain motion points is optimal, especially in vehicle route problems (VRP).

Method used

By generating a virtual route that matches the actual route, where the actual edge is replaced at a specific step, and assigning labels to each edge using a classification model, the degree of influence of the actual edge and the virtual edge is calculated, and an explanatory sentence is finally generated.

Benefits of technology

The explanation of the selection of motion points in the vehicle route optimization solution is realized, and users' understanding and satisfaction with route generation are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023035863_10042025_PF_FP_ABST
    Figure JP2023035863_10042025_PF_FP_ABST
Patent Text Reader

Abstract

This explanation device includes: an input unit for inputting a first edge to serve as an explanation target on a first route generated as a solution of a route optimization problem, a step number of the first edge, and a second edge representing a counterfactual edge of the first edge; a route generation unit for generating a second route which is a solution of the route optimization problem, matches the first route before the step number, and serves as the second edge at the step number; an edge classification unit that applies a label to the edge of the first route and the edge of the second route; a first impact calculation unit that calculates a first impact of the first edge; a second impact calculation unit that calculates a second impact of the second edge; and an explanatory sentence generation unit that, on the basis of the results of a comparison between the first impact and the second impact, generates an explanatory sentence as regards why the first edge was selected instead of the second edge at the step on the first route.
Need to check novelty before this filing date? Find Prior Art

Description

Explanation device, explanation method, and program

[0001] The present disclosure relates to an explanation device, an explanation method, and a program.

[0002] There are many cases where it is necessary to explain "why a certain movement is optimal" for a movement between certain points on a vehicle routing route generated as an optimal solution to a vehicle routing problem (VRP). For example, when generating a power supply vehicle route in the event of a large-scale power outage, accountability for the vehicle route is required. Furthermore, for example, when interactively generating and proposing tourist routes, it is thought that explaining "why a movement is optimal" for the movement along the proposed route will lead to increased user acceptance and satisfaction.

[0003] On the other hand, as one of the explanation methods, a framework for explaining the reasons for an agent's behavior in reinforcement learning has been proposed (Non-Patent Document 1).

[0004] Prashan Madumal, Tim Miller, Liz Sonenberg, Frank Vetere, "Explainable Reinforcement Learning Through a Causal Lens", arXiv:1905.10958v2 [cs.LG] 20 Nov 2019.

[0005] However, there has been no method to date that explains "why a certain movement between certain points on a route generated as a solution for route optimization including VRP is optimal."

[0006] The present disclosure has been made in consideration of the above points, and aims to provide a technology that can provide an explanation for a route generated as a solution for route optimization.

[0007] An explanation device according to one aspect of the present disclosure includes an input unit that inputs a first edge representing an edge to be explained among edges included in a first route generated as a solution to a route optimization problem, a step number of the first edge, and a second edge representing a counterfactual edge of the first edge; a route generation unit that generates, as a second route, a route that is a solution to the route optimization problem, which matches the first route in a step prior to the step number and in which an edge in the step having the step number becomes the second edge; and an encoder that assigns, to each edge included in the first route and each edge included in the second route, a label representing a class into which the edge is classified. a first influence calculation unit that calculates a first influence degree for evaluating the influence of the first edge on the first route based on the first route and the labels of each edge included in the first route; a second influence calculation unit that calculates a second influence degree for evaluating the influence of the second edge on the second route based on the second route and the labels of each edge included in the second route; and an explanation generation unit that generates an explanation that answers the question of why the first edge was selected instead of the second edge in the step of the step number on the first route based on a comparison result between the first influence degree and the second influence degree.

[0008] A technique is provided that can provide an explanation for the route generated as a route optimization solution.

[0009] Fig. 1 is a diagram illustrating an example of an outline of an explanation method for a vehicle dispatch route. Fig. 2 is a diagram illustrating an example of a classification model. Fig. 3 is a diagram illustrating an example of a hardware configuration of an explanation device according to the present embodiment. Fig. 4 is a diagram illustrating an example of a functional configuration of an explanation device according to the present embodiment. Fig. 5 is a flowchart illustrating an example of an explanation process according to the present embodiment. Fig. 6 is a flowchart illustrating an example of a learning process according to the present embodiment.

[0010] An embodiment of the present invention will be described below.

[0011] <Outline of Explanation Method> First, an outline of the explanation method proposed in this embodiment will be described. As an example, an explanation method capable of providing an explanation for a vehicle allocation route (hereinafter simply referred to as a route) generated as a solution of a VRP will be described below with reference to FIG. 1. FIG. 1 is a diagram illustrating an example of an outline of an explanation method for a vehicle allocation route. Note that, as an example, the explanation below will be given for a case where the vehicle allocation route is a circular route. However, even if the vehicle allocation route is not a circular route, the explanation method proposed in this embodiment can be similarly applied.

[0012] As shown in Figure 1, first, (1) a VRP instance, which is a route optimization problem to be solved, is given, and then (2) an actual route, which is the optimal solution, is generated from the VRP instance using a VRP solver or the like. In the example shown in Figure 1, a circular route of 1 → 2 → 3 → 4 → 6 → 7 → 5 → 1 is generated as the actual route.

[0013] At this time, (3) the user wants to know "why was the move 3 → 4 selected instead of 3 → 5?" In this case, edge 3-4 representing the move 3 → 4 is set as the actual edge to be explained, and edge 3-5 representing the move 3 → 5 is set as the counterfactual edge to be explained. Note that a counterfactual edge is an edge that is not included in the generated actual route but could have been included.

[0014] Next, (4) a counterfactual route, which is a route following the counterfactual edge, is generated using a VRP solver or the like. Note that a counterfactual route is a route that includes the counterfactual edge and is generated assuming that the edge preceding the counterfactual edge is the same as the actual route. In the example shown in Figure 1, a cyclic route of 1 → 2 → 3 → 5 → 6 → 7 → 1 is generated as the counterfactual route.

[0015] Next, (5) using a classification model that classifies edges into one of a plurality of predetermined classes, the edges included in the actual route and the edges included in the counterfactual route are classified, and a label indicating the class to which the edge belongs is assigned to each edge. In the example shown in FIG. 1, the label y is assigned to edge 1-2 included in the actual route. 1fact , label y for edge 2-3 2 fact , label y for edge 3-4 3 fact , label y for edges 4-6 4 fact , label y for edge 6-7 5 fact , label y for edge 7-5 6 fact , label y for edge 5-1 7 fact Similarly, the edge 1-2 included in the counterfactual root is given a label y 1 Q , label y for edge 2-3 2 Q , label y for edges 3-5 3 Q , label y for edge 5-6 4 Q , label y for edge 6-7 5 Q , label y for edge 7-1 6 Q are given respectively.

[0016] Next, (6) the influence of the real edge of the explanation target is calculated using the edges included in the real route and their labels. Similarly, the influence of the counterfactual edge of the explanation target is calculated using the edges included in the counterfactual route and their labels. Then, the influence of the real edge of the explanation target is compared with the influence of the counterfactual edge of the explanation target. Finally, (7) the comparison result and a template of a natural language sentence are used to generate and output an explanation for the question, "Why was the move from 3 to 4 selected instead of 3 to 5?"

[0017] As a result, the user can refer to the final output explanation to get an explanation for the question, "Why was the move from 3 to 4 selected instead of 3 to 5?"

[0018] If a vehicle dispatch route generated as a solution of a VRP is given instead of a VRP instance, the process may be executed from (3) onwards.

[0019] <Details of Explanation Method> The explanation method proposed in this embodiment will be described in detail below.

[0020] Definition of Notations A VRP instance is considered to be a complete graph in which all visiting points are connected by edges. Here, a VRP instance refers to information including, for example, coordinates of visiting points, visiting points that are starting points, visiting points that are destinations, etc. Note that a VRP instance may include various information other than the above depending on the type and nature of the problem. For example, if the VRP is a traveling salesman problem with time windows (TSPTW), the VRP instance includes the travel time of each edge, the visiting time period for each visiting point, etc. In addition, if the VRP is a prize collecting traveling salesman problem (PCTSP), the VRP instance includes prizes and penalties for each visiting point, etc. Similarly, if the VRP is a capacitated vehicle routing problem (CVRP), the VRP instance includes the capacity of delivery vehicles, the demand for each visiting point, etc. Furthermore, regarding a VRP instance as a complete graph is merely an example, and it may be an incomplete graph if, for example, there is no connection between certain visited points.

[0021] Let the visited points be nodes and let the edge connecting node i to node j be e ij In addition, the discrete time at which the vehicle visits a destination (including the departure point and destination) is called a step, and the edge connecting the destination (node) visited at step t and the next destination (node) visited is called e. t In this case, the route generated from the VRP instance can be represented by a sequence of edges as follows:

[0022] Here, T is the number of steps in the route. Also, let N be the number of visited points (nodes) included in the VRP instance, and πt ∈{1, ..., N} represents the number of the node visited at step t of the route. In the text of this specification, a subscript of a subscript will be expressed by adding an underscore "_" immediately before it. For example, in the text of this specification, e in the above formula 1 will be expressed as e = (e π_1π_2 , ..., eπ_(T-1)π_T).

[0023] Definition of Why & Why Not Questions in VRP We define Why & Why Not questions as questions that ask "why is the movement optimal" regarding movement between certain visit points on the generated route, in other words, "why was a certain edge selected instead of another edge at a certain step on the generated route?"

[0024] Why & Why Not questions in VRP are fact and the step t ex and the actual edge e t_ex fact and the counterfactual edge e t_ex That is, a Why & Why Not question in VRP is composed of Q = (e fact , t ex , e t_ex fact , e t_ex ').

[0025] In addition, the counterfactual edge e t_ex ' is the step t ex It is an edge that was not selected in e but could have been selected. t_ex fact ≠e t_ex ' is.

[0026] The above Why & Why Not question Q is "Why is the generated route e fact Step t ex In this case, the counterfactual edge e t_ex ' but real edge e t_ex fact The question is, "Was it selected?"

[0027] Definition of Counterfactual Route In order to calculate and compare the influence of an actual edge and the influence of a counterfactual edge, a route following the counterfactual edge is required. Therefore, the counterfactual route is defined as follows:

[0028] Here, e Q represents the counterfactual root. route is a function for generating a route (for example, a function representing a VRP solver, a function representing a route generation model realized by a machine learning model, etc.). x is a VRP instance, e fixed is a sequence of edges that must be included in the generated route. t fact is the real root e fact is the edge at step t of

[0029] The above counterfactual route e Q is step t ex The edge up to -1 is the real root e fact and step t ex The edge in t_ex Q = e t_ex '. Note that the real root e fact and the counterfactual root e Q Note that the origin and destination are the same.

[0030] - Index of influence of edge It is assumed that a label is assigned to each edge included in the actual route and the counterfactual route by the classification model. In this case, the influence of edge e at step t on the entire route is t The influence of an edge e at step t is defined as a sequence of pairs of the edges of the root that follow that edge and their labels. t The impact of is defined as follows:

[0031] Here, y t' is the edge e at step t' t' This is the label.

[0032] In practice, the influence I defined by the above formula 3 can be used to quantitatively evaluate the influence.e_t A set of functions F that converts rep Using t Influence I e_t The representative value is calculated as follows:

[0033] The above function set F rep Various sets of functions can be used for F depending on the type and nature of the problem. For example, if the VRP is a time-constrained traveling salesman problem, F rep = (f obj , f class , f feasible ) etc. can be used. obj is I e_t The root length of the edge sequence e t+1 , ..., e T-1 is a function that calculates the length of f obj is expressed as s:=f using a predetermined distance function d that calculates the Euclidean distance as the length of the edge. obj (I e_t ) = d(e t+1 ) + ... + d (e T-1 ) etc. class is I e_t is a function that calculates the percentage of labels. class For example, if y∈{0, 1}, then a 0 = (y t+1 , ..., y T-1 Among them t' = 0) / (T-t-1) and a 1 = (y t+1 , ..., y T-1 Among them t' = 1) / (T-t-1). In this case, a 1 = 1 - a 0 Therefore, f class Haa 0 or a 1 It may be defined as a function that outputs only one of the above. feasible is I e_t This is the percentage of destinations that could be visited within f feasible For example, N visitedis the number of destinations that could be visited from step t+1 to step T-1, M visited Let f be the number of destinations that can be visited in steps 1 to t, and let r be the number of destinations that can be visited in steps 1 to t. feasible (I e_t ) = N visited / (N-M visited ) etc.

[0034] In addition, the function set F rep is a set of one or more functions, so it should be noted that the representative value shown in the above formula 4 is generally expressed as a set containing one or more elements. For simplicity, hereinafter, it is assumed that y∈{0, 1}, and the influence I e_t Representative value R e_t is s and (a 0 , a 1 ), and r.

[0035] Method for comparing the influence of real edges and counterfactual edges of the subject to be explained It is assumed that a representative value of the influence of real edges of the subject to be explained and a representative value of the influence of counterfactual edges of the subject to be explained are calculated. Note that the representative value of the influence of real edges of the subject to be explained and the representative value of the influence of counterfactual edges of the subject to be explained are respectively expressed as follows:

[0036] However, in the following, for the sake of simplicity, the representative value of the influence of the actual edge to be explained is referred to as "R fact ”, and the representative value of the influence of the counterfactual edge to be explained is “R Q That is, the representative value of the influence degree of the actual edge to be explained and the representative value of the influence degree of the counterfactual edge to be explained are respectively expressed as follows:

[0037] At this time, the representative value of the influence degree of the actual edge of the explanation object and the representative value of the influence degree of the counterfactual edge of the explanation object are compared as follows.

[0038] Here, F comare is a set of functions for comparing elements included in the representative value of the influence degree of the actual edge to be explained with elements included in the representative value of the influence degree of the counterfactual edge to be explained.

[0039] Fcomare For example, a set of functions that simply calculate the difference between elements can be used. Q is the representative value R Q f included in obj The value of s Q and the representative value R fact f included in obj The value of s fact Difference Δs:=s Q -s fact and the representative value R Q f included in class The value of (a 0 Q , a 1 Q ) and representative value R fact f included in class The value of (a 0 fact , a 1 fact ) and the difference Δa:=(Δa 0 , Δa 1 ) = (a 0 Q -a 0 fact , a 1 Q -a 1 fact ) and the representative value R Q f included in feasible The value of r Q and the representative value R fact f included in feasible The value of r fact Difference Δr:=r Q -r fact It is expressed as a set of three elements, namely, X Q = {Δs, Δa, Δr}.

[0040] ・Generate an explanation The comparison result X shown in the above formula 7 Q = {Δs, Δa, Δr} is calculated. Also, it is assumed that the following natural language sentence template is defined:

[0041] "The actual edge is required because if the CF edge was selected at the step, {positive / neutral comparison results}, but {negative comparison results} with the class ration changing as {compared class ratio}." Q = {Δs, Δa, Δr}, a natural sentence expressing a positive or neutral comparison result is inserted into the first curly bracket {positive / neutral comparison results}, a natural sentence expressing a negative comparison result is inserted into the second curly bracket {negative comparison results}, and a natural sentence expressing Δa is inserted into the third curly bracket {compared class ratio}, thereby generating an explanatory sentence. Note that positive and negative are not symbols, but rather indicate whether the result is good or bad.

[0042] For example, assume that Δs = −10, Δa = (−0.3, 0.3), and Δr = −5. In this case, for example, a natural language sentence indicating that the route length will be shortened by 10 km is inserted into the first set of curly brackets, a natural language sentence indicating that the number of destinations will be reduced by 5 is inserted into the second set of curly brackets, and a natural language sentence indicating that the number of labels with y = 0 will be reduced by 30% and the number of labels with y = 1 will be increased by 30% is inserted into the third set of curly brackets. This allows the user to understand, for example, by referring to the explanation, that "the route length will be shortened, but the number of destinations will be reduced, so the counterfactual edge was not selected." Furthermore, because the labels of the edges included in the actual route and the counterfactual route are used as additional information for the explanation, the user can obtain a more detailed explanation, such as how the ratio of labels changes between the actual route and the counterfactual route.

[0043] Classification Model A classification model that classifies each edge included in the actual route and the counterfactual route into one of a plurality of classes is realized by a machine learning model such as a deep learning model. The classification model is implemented by a route e=(e 1 , ..., e T-1 ) = (e π_1π_2 , ..., eπ_(T-1)π_T) as input, and the label string y=(y 1 , ..., y T-1 Any machine learning model can be used as long as it outputs y t is edge e t This is the label.

[0044] As an example, a classification model consisting of three machine learning models, a node encoder, an edge encoder, and a classification decoder, is shown in Figure 2. The classification model shown in Figure 2 has a root e = (e 1 , ..., e T-1 ) = (e π_1π_2 , ..., eπ_(T-1)π_T) is input, first, the node encoder 1 th to π T The feature of each node is calculated by the edge encoder. The node encoder is realized by a linear transformation layer that receives information representing the node as input and converts the information into a feature vector of a predetermined dimension. Next, the edge encoder calculates the feature of each edge e 1 , ..., e T-1The edge encoder, for example, takes as input the feature quantities of the nodes at both ends of the edge, and linearly transforms a vector obtained by concatenating the feature quantities of the nodes at both ends of the edge and the state quantity at the step of the edge to calculate a vector as the feature quantity of the edge. Then, a classification decoder calculates a label for each edge from the feature quantities of each edge. The classification decoder, for example, takes as input the feature quantities of each edge, and converts the feature quantities of each edge into an embedding vector using L Transformer Encoder Layers configured with Masked Multi-Head Attention, and then calculates the label of each edge using linear transformation according to the number of classes and a Softmax function. In the example shown in FIG. 2, a classification model configured with a node encoder, an edge encoder, and a classification decoder calculates a route e=(e 1 , ..., e 7 ) for the label string y=(y 1 , ..., y 7 ) is calculated.

[0045] Learning the classification model As an example, we will explain the case where the VRP is a traveling salesman problem with a time constraint. Also, let us assume that the labels are y∈{0, 1}, where y=0 represents the reason for visiting "to shorten the travel distance" and y=1 represents the reason for visiting "to meet the time constraint."

[0046] At this time, when a certain VRP instance is obtained, learning data is generated by the following steps S1 to S5.

[0047] S1: A route (hereinafter referred to as a first route) is generated from the VRP instance.

[0048] S2: Let t=1.

[0049] S3: Generate a route (hereinafter referred to as a second route) from the VRP instance while fixing the destinations before step t.

[0050] S4: Compare the destinations at step t of the first route and the second route, and if they match, create an edge e tIf there is no match, the label of edge e t Let the label be 1.

[0051] S5: Set t←t+1, and repeat S3 to S4 above until t=T.

[0052] This gives the first route e=(e 1 , ..., e T-1 ) and its label (hereinafter also referred to as the correct label) 1 , ..., y T-1 ) pairs are obtained. Therefore, for example, by repeating steps S1 to S5 above using a large number of randomly generated VRP instances, a sufficient amount of training data can be obtained as a training dataset.

[0053] As a loss function for training a classification model, for example, the following loss function can be used:

[0054] Here, y e_t is a one-hot vector representing the correct label at step t. e_t is the edge sequence e=(e 1 , ..., e T-1 ) is a prediction result (a vector whose elements are the probability of being classified into each class) predicted by the classification model from the root length T. β is a hyperparameter (for example, β = 0.99 or 0.999), T is the root length, Γ is a set of root lengths, and τ is a symbol representing transposition. In addition, the following is the number of samples (number of training data) that will be labeled y at step t in a route of root length T:

[0055] In the loss function shown in Equation 8 above, the weight (i.e., y e_t τ logp e_tSince the loss function (coefficient part for ) is calculated for each step t, the use of this loss function makes it possible to properly train a classification model even when there is an imbalance in the labels in the training dataset. For example, even when a specific label is assigned to a large amount of training data at a specific step, the classification model can be properly trained.

[0056] Hereinafter, an explanation device 10 that can provide an explanation for a route generated as a solution of route optimization using the above explanation method will be described.

[0057] <Example of Hardware Configuration of Explanation Device 10> An example of a hardware configuration of the explanation device 10 according to this embodiment will be described with reference to Fig. 3. Fig. 3 is a diagram showing an example of the hardware configuration of the explanation device 10 according to this embodiment.

[0058] 3, the explanation device 10 according to this embodiment includes an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Each of these pieces of hardware is connected to each other via a bus 109 so as to be able to communicate with each other.

[0059] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the explanation device 10 does not necessarily have to include at least one of the input device 101 and the display device 102, for example.

[0060] The external I / F 103 is an interface with an external device such as a recording medium 103a. Examples of the recording medium 103a include a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.

[0061] The communication I / F 104 is an interface for connecting the explanation device 10 to a communication network. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a non-volatile storage device such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory. The processor 108 is a variety of arithmetic devices such as a CPU (Central Processing Unit) or a GPU (Graphic Processing Unit).

[0062] 3 is an example, and the hardware configuration of the explanation device 10 is not limited to this. The explanation device 10 may have, for example, multiple auxiliary storage devices 107 or multiple processors 108, may not have some of the hardware shown in the figure, or may have various hardware other than the hardware shown in the figure.

[0063] <Example of Functional Configuration of Explanation Device 10> An example of the functional configuration of the explanation device 10 according to this embodiment will be described with reference to Fig. 4. Fig. 4 is a diagram showing an example of the functional configuration of the explanation device 10 according to this embodiment.

[0064] 4, the explanation device 10 according to this embodiment includes an input unit 201, a route generation unit 202, a question creation unit 203, an edge classification unit 204, an influence calculation unit 205, a comparison unit 206, an explanation generation unit 207, an output unit 208, and a learning unit 209. Each of these units is realized by, for example, processing in which one or more programs installed in the explanation device 10 are executed by the processor 108 or the like.

[0065] The input unit 201 receives a given VRP instance. The input unit 201 also receives step edges (i.e., step t ex , the actual edge e to be explained t_ex fact , and the counterfactual edge et_ex ').

[0066] The route generation unit 202 generates an actual route e from the VRP instance input by the input unit 201. fact Furthermore, the route generating unit 202 generates a counterfactual route e Q The route generation unit 202 is realized by a route generation model realized by a VRP solver, a machine learning model, or the like, for example.

[0067] The question generation unit 203 generates the actual route e generated by the route generation unit 202. fact and the step / edge of the explanation object input by the input unit 201, a Why & Why Not question Q=(e fact , t ex , e t_ex fact , e t_ex ') to create a new file.

[0068] The edge classification unit 204 uses the trained edge classification model to determine the actual route e fact Similarly, the edge classification unit 204 uses the learned edge classification model to calculate the counterfactual root e Q is used as input, and a label string representing the class into which each edge included in the edge string is classified is calculated.

[0069] The influence calculation unit 205 calculates the actual route e fact and its label string, the actual edge e is calculated by the above formulas 3 and 4. t_ex fact Representative value of the influence of R fact Similarly, the influence calculation unit 205 calculates the counterfactual route e Q and its label sequence, the counterfactual edge e t_ex Q = e t_ex Representative value of the influence of 'R Q Calculate.

[0070] The comparison unit 206 calculates the actual edge e t_ex factRepresentative value of the influence of R fact and the counterfactual edge e t_ex Q = e t_ex Representative value of the influence of 'R Q Comparison result with X Q Calculate.

[0071] The explanation generation unit 207 compares the comparison result X calculated by the comparison unit 206 with Q and a predefined template of natural language sentence, an explanatory sentence is generated as an answer to a Why & Why Not question Q in VRP.

[0072] The output unit 208 outputs the explanatory text generated by the explanatory text generation unit 207 to a predetermined output destination. Note that, for example, the output destination may be the display device 102 such as a display. However, this is just one example, and the output unit 208 may output the explanatory text to an output destination other than the display device 102. For example, the output unit 208 may output the explanatory text to a display or the like provided on a terminal communicably connected to the explanation device 10, or may convert the explanatory text into audio or the like and output it from a speaker or the like.

[0073] The learning unit 209 generates learning data for learning a classification model, and uses the learning data to learn the classification model.

[0074] <Explanation Process> An example of the explanation process according to this embodiment will be described below with reference to Fig. 5. Fig. 5 is a flowchart showing an example of the explanation process according to this embodiment. Note that, in the following, it is assumed that the classification model has already been trained.

[0075] The input unit 201 receives a given VRP instance (step S101).

[0076] Next, the route generation unit 202 generates an actual route e from the VRP instance input in step S101. fact is generated (step S102).

[0077] Next, the input unit 201 inputs the step edge of the given explanation object (step t ex , the actual edge e to be explainedt_ex fact , and the counterfactual edge e t_ex ') is input (step S103).

[0078] Next, the question generation unit 203 generates the real route e generated in step S102. fact and the step / edge of the explanation object input in step S103, a Why & Why Not question Q=(e fact , t ex , e t_ex fact , e t_ex ') is created (step S104).

[0079] Next, the route generation unit 202 calculates the counterfactual route e Q is generated (step S105).

[0080] Next, the edge classification unit 204 uses the trained edge classification model to calculate the actual route e fact The label sequence of each edge included in Q The label string of each edge included in the actual route e is calculated (step S106). fact The label sequence of each edge included in y fact , counterfactual root e Q The label sequence of each edge included in y Q Let's say.

[0081] Next, the influence calculation unit 205 calculates the actual route e fact and its label sequence y fact From the above equations 3 and 4, the actual edge e t_ex fact Representative value of the influence of R fact and calculate the counterfactual root e Q and its label sequence y Q From the above equations 3 and 4, the counterfactual edge e t_ex Q = e t_ex Representative value of the influence of 'R Q is calculated (step S107).

[0082] Next, the comparison unit 206 compares the representative value R calculated in step S107 with the representative value Rfact and representative value R Q Comparison result X Q is calculated using the above equation 7 (step S108).

[0083] Next, the explanation generation unit 207 compares the comparison result X calculated in step S108 with the Q and a predefined template of natural language sentence, an explanatory sentence that serves as an answer to a Why & Why Not question Q in the VRP is generated (step S109). Q When Δs={Δa, Δr} is calculated, the explanation generation unit 207 inserts the comparison result X in each parentheses of the template of the natural language sentence as follows: Q An explanation is generated by inserting natural language (including numerical values) according to the set of values ​​{Δs, Δa, Δr}.

[0084] "The actual edge is required because if the CF edge was selected at the step, {positive / neutral comparison results}, but {negative comparison results} with the class ration changing as {compared class ratio}." Here, a natural sentence expressing a positive or neutral comparison result is inserted into the first curly bracket {positive / neutral comparison results}, a natural sentence expressing a negative comparison result is inserted into the second curly bracket {negative comparison results}, and a natural sentence expressing Δa is inserted into the third curly bracket {compared class ratio}.

[0085] Then, the output unit 208 outputs the explanatory text generated in step S109 to a predetermined output destination (step S110), thereby enabling the user to refer to the explanatory text that serves as the answer to the Why & Why Not question Q in the VRP.

[0086] In the above-described process, a VRP instance is provided and an actual route is generated from the VRP instance. However, for example, a VRP instance and an actual route generated from the VRP instance may be provided in step S101. In this case, step S102 in the process may not be executed.

[0087] <Learning Process> An example of the learning process according to this embodiment will be described below with reference to Fig. 6. Fig. 6 is a flowchart showing an example of the learning process according to this embodiment. Note that in the following, it is assumed that the classification model has not been trained.

[0088] First, the learning unit 209 randomly generates a plurality of VRP instances (step S201).

[0089] Next, the learning unit 209 generates training data from each of the VRP instances generated in step S201, and creates a training data set consisting of this training data (step S202). At this time, the learning unit 209 may generate training data from each VRP instance by steps S1 to S5.

[0090] Then, the learning unit 209 uses the learning dataset created in step S202 to update the parameters of the machine learning model that realizes the classification model, for example, so as to minimize the loss function shown in equation 8 above (step S203). This allows the classification model to be trained, and a trained classification model is obtained. Note that an existing optimization method may be used to update the parameters of the machine learning model that realizes the classification model.

[0091] <Modifications> In the above embodiment, a case has been described in which a VRP is used as a target and an explanation is given for a vehicle dispatch route generated as a solution to the VRP. However, the above embodiment can also be applied to a case in which an explanation is given for a route other than a vehicle dispatch route generated as a solution to the VRP. For example, the above embodiment can also be applied to a case in which an explanation is given for a routing path generated by a network routing technology. That is, the above embodiment can be similarly applied by replacing "destination" with "network device" and "edge" with "link between network devices" in the above embodiment. However, a template for a natural language sentence must be defined separately for the network routing technology. Note that a routing path can be generated, for example, by a network routing solver or the like.

[0092] <Summary> As described above, the explanation device 10 according to the present embodiment can generate an explanation that answers the question, "Why was a different edge selected instead of a certain edge at a certain step of the generated route?", regarding a route generated as a solution to route optimization including VRP. Therefore, by using the explanation device 10 according to the present embodiment, it becomes possible to provide an explanation for route generation that requires accountability, such as generating a power supply vehicle dispatch route in the event of a large-scale power outage. Furthermore, for example, when interactively generating and proposing a tourist route, it is possible to improve a user's sense of satisfaction and satisfaction with traveling along the proposed route.

[0093] The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.

[0094] 10 Explanation device 101 Input device 102 Display device 103 External I / F 103a Recording medium 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage device 108 Processor 109 Bus 201 Input unit 202 Route generation unit 203 Question creation unit 204 Edge classification unit 205 Influence calculation unit 206 Comparison unit 207 Explanation generation unit 208 Output unit 209 Learning unit

Claims

1. An input unit for inputting a first edge representing an edge to be explained among edges included in a first route generated as a solution to a route optimization problem, a step number of the first edge, and a second edge representing a counterfactual edge of the first edge; a route generation unit for generating as a second route a route which is a solution to the route optimization problem, which matches the first route in a step prior to the step number, and in which the edge in the step having the step number is the second edge; an edge classification unit for assigning labels to each edge included in the first route and each edge included in the second route, the labels representing classes into which the edges are classified; a first influence calculation unit for calculating a first influence degree for evaluating an influence of the first edge on the first route based on the first route and the labels of each edge included in the first route; and a second influence calculation unit for calculating a second influence degree for evaluating an influence of the second edge on the second route based on the second route and the labels of each edge included in the second route. and an explanatory sentence generation unit that generates an explanatory sentence that expresses an answer to the question of why the first edge was selected instead of the second edge at the step of the step number on the first route based on a comparison result between the first influence degree and the second influence degree.

2. The explanatory device according to claim 1, wherein the explanatory sentence generation unit generates the explanatory sentence by inserting a natural language sentence according to the comparison result into a predefined natural language sentence template.

3. The explanatory device described in claim 1 or 2, wherein the first influence calculation unit calculates the first influence based on an edge in a step later than the step number among the edges included in the first route and a label of the edge, and the second influence calculation unit calculates the second influence based on an edge in a step later than the step number among the edges included in the second route and a label of the edge.

4. The explanatory device described in claim 3, wherein the first impact calculation unit calculates a representative value of the first impact using a predetermined function set, the second impact calculation unit calculates a representative value of the second impact using the function set, and the explanatory text generation unit generates the explanatory text based on a comparison result between the representative value of the first impact and the representative value of the second impact.

5. The explanatory device of claim 1, wherein the edge classification unit assigns the label to each edge included in the first route and each edge included in the second route using a classification model realized by a pre-trained machine learning model.

6. The explanatory device described in claim 5, wherein the classification model is trained to minimize a loss function including weights that may differ for each step of the route using learning data represented by pairs of a route and a label of an edge included in the route.

7. An input step of inputting a first edge representing an edge to be explained among edges included in a first route generated as a solution to a route optimization problem, a step number of the first edge, and a second edge representing a counterfactual edge of the first edge; a route generation step of generating as a second route a route which is a solution to the route optimization problem, which matches the first route in a step prior to the step number, and in which the edge in the step having the step number becomes the second edge; an edge classification step of assigning labels representing classes into which the edges are classified to each edge included in the first route and each edge included in the second route; a first influence calculation step of calculating a first influence degree for evaluating an influence of the first edge on the first route based on the first route and the labels of each edge included in the first route; and a second influence calculation step of calculating a second influence degree for evaluating an influence of the second edge on the second route based on the second route and the labels of each edge included in the second route. an explanation generation procedure for generating an explanation that expresses an answer to the question of why the first edge was selected instead of the second edge in the step having the step number in the first route based on a comparison result between the first influence degree and the second influence degree.

8. An input step of inputting a first edge representing an edge to be explained among edges included in a first route generated as a solution to a route optimization problem, a step number of the first edge, and a second edge representing a counterfactual edge of the first edge; a route generation step of generating as a second route a route which is a solution to the route optimization problem, which matches the first route in a step prior to the step number, and in which the edge in the step having the step number becomes the second edge; an edge classification step of assigning a label representing a class into which the edge is classified to each edge included in the first route and each edge included in the second route; a first influence calculation step of calculating a first influence degree for evaluating an influence of the first edge on the first route based on the first route and the label of each edge included in the first route; and a second influence calculation step of calculating a second influence degree for evaluating an influence of the second edge on the second route based on the second route and the label of each edge included in the second route. and an explanation generation procedure for generating an explanation that expresses an answer to the question of why the first edge was selected instead of the second edge in the step having the step number in the first route, based on a comparison result between the first influence degree and the second influence degree.

Citation Information

Patent Citations

  • Explainability and Interface Design for Lane-Level Route Planner

    US20220315000A1