Model verification device and model verification method
The model verification device transforms constrained input regions into a suitable search space for efficient counterexample detection, addressing inefficiencies in existing techniques by optimizing sampling within constrained areas.
Patent Information
- Application Number
- JP2020203366
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-08
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2040-12-08
AI Technical Summary
Existing model verification techniques for hybrid systems with constraints face inefficiencies due to unnecessary sampling in unconstrained regions, leading to high computational overhead.
A model verification device and method that spatially transforms constrained input regions into a suitable search space, applying algorithms like hill-climbing to efficiently find counterexamples within the constrained area.
This approach reduces computational overhead by focusing sampling on constrained areas, enabling efficient model verification with reduced resource consumption.
Smart Images

Figure 0007551966000003 
Figure 0007551966000009 
Figure 0007551966000010
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a model validation apparatus and a model validation method. [Background technology]
[0002] In a hybrid system that has both physical and digital elements, formal verification is difficult because the search range is infinite. One of the verification methods proposed so far is falsification, which searches for counterexamples that violate the specifications of the hybrid system.
[0003] In a typical counterexample generation method, we consider a hybrid model M as a black-box model and a specification φ that the hybrid model M should satisfy, and input u to the hybrid model M that does not satisfy the specification φ. * Counterexamples are searched for using methods such as stochastic hill-climbing. Summary of the Invention [Problem to be solved by the invention]
[0004] On the other hand, in model verification, a constraint ψ may be imposed on the input to the model M. For example, in a car speed control model that takes the accelerator and brake as inputs and outputs the vehicle speed, the accelerator and brake never both operate at the same time. For this reason, a constraint ψ is imposed on the search range for combinations of accelerator and brake inputs for counterexample search to exclude such cases.
[0005] Constraint Embedding (CE) and Lexicographic (LM) are known methods for solving counterexample problems where constraints are imposed on the input. However, these methods involve sampling in areas of the search space that do not satisfy the constraints, resulting in large computational overhead.
[0006] An object of the present disclosure is to provide an efficient model checking technique for a constrained search space. [Means for solving the problem]
[0007] In order to solve the above-mentioned problems, one aspect of the present invention relates to a model verification apparatus comprising: a sample extraction unit which extracts a sample x from a search space; a space transformation unit which transforms the extracted sample x into an input u in a search space constrained by a constraint ψ for a model M in accordance with a predetermined transformation rule; and a counterexample determination unit which determines whether an output M(u) of the model M for the input u satisfies a specification φ, and determines the input u as a counterexample if the output M(u) does not satisfy the specification φ. Effect of the Invention
[0008] According to the present disclosure, it is possible to provide an efficient model verification technique for a constrained search space. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a schematic diagram illustrating a model verification apparatus according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram illustrating a spatial transformation according to an embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram illustrating a conversion from a sample x to an input u according to an embodiment of the present disclosure. [Figure 4] FIG. 2 is a block diagram showing a hardware configuration of a model verification apparatus according to an embodiment of the present disclosure. [Diagram 5] FIG. 2 is a block diagram showing a functional configuration of a model verification apparatus according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a schematic diagram illustrating proportional conversion according to one embodiment of the present disclosure. [Figure 7] FIG. 1 is a schematic diagram illustrating proportional conversion according to one embodiment of the present disclosure. [Figure 8] FIG. 1 is a schematic diagram illustrating proportional conversion according to one embodiment of the present disclosure. [Figure 9]1 is a flowchart illustrating a model validation process according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] In the following embodiment, a model verification device is disclosed that verifies whether a model of a physical information system or the like satisfies a specification for an input to which a constraint condition is imposed. [Summary] As shown in FIG. 1 , a model verification device 100 according to an embodiment of the present disclosure is configured to, for a model M, a specification φ, and a constraint ψ, identify counterexamples u(u) of the model M that do not satisfy the specification φ among outputs M(u) of the model M corresponding to inputs u that satisfy the constraint ψ. * Typically, the model M may be a physical information model that has a black-box internal structure and in which only the input / output relationship is observable. In this disclosure, in order to facilitate the search for an input u that satisfies the constraint condition ψ, the input domain U of the model M that satisfies the constraint condition ψ is spatially transformed to construct a search space X with fewer constraint conditions suitable for a search algorithm, and a counterexample u is searched for in the search space X according to a search algorithm such as a hill-climbing method. * Find a sample x to extract.
[0011] For example, as shown in Fig. 2, an input region U that satisfies a constraint ψ is spatially transformed into a square search space X. In the specific example shown in Fig. 2(a), intuitively, the input region U with constraint conditions in the shape of a right-angled isosceles triangle is stretched and spatially transformed into a square search region X suitable for a search algorithm. In the specific example shown in Fig. 2(b), intuitively, the input region U with constraint conditions in the shape of a rhombus is stretched and spatially transformed into a square search region X. These spatial transformations can be realized by proportional transformations.
[0012] In this way, when the conversion rule from the constrained search space U to the search space X suitable for the search algorithm is determined, instead of sampling the input u in the constrained search space U having a shape corresponding to the constraint ψ, as shown in Fig. 3, a sample x is searched for in a square or rectangular search space X (called a hypercube or a hyperrectangle in a three-dimensional or higher space, respectively) according to a search algorithm such as a hill-climbing method, and the extracted sample x is converted to a point u on the constrained search space U. By sampling in the unconstrained search space X in this way, it is possible to ensure the degree of freedom of the search range required for the search by the hill-climbing method, and by converting the sample x extracted in the search space X to the input u on the constrained search space U, it is possible to realize efficient model verification for the input u to which a constraint is imposed.
[0013] Here, the model verification device 100 may have a hardware configuration including a processor 101 such as a CPU (Central Processing Unit), a memory 102 such as a RAM (Random Access Memory) or a flash memory, a storage 103, and an input / output (I / O) interface 104, for example, as shown in FIG. 4.
[0014] The processor 101 executes various processes of the model verification device 100, which will be described later.
[0015] Memory 102 stores various data and programs in model verification device 100, and functions in particular as a working memory for working data, programs being executed, etc. Specifically, memory 102 stores programs for executing and controlling various processes, which will be described later, that are loaded from hard disk 103, and functions as a working memory while processor 101 is executing the programs.
[0016] The hard disk 103 stores various data and programs in the model verification device 100 .
[0017] The I / O interface 104 is an interface for receiving commands and input data from a user, displaying and playing back output results, and inputting and outputting data between an external device. For example, the I / O interface 104 may be a device for inputting and outputting various types of data, such as a USB (Universal Serial Bus), a communication line, a keyboard, a mouse, a display, a microphone, and a speaker.
[0018] However, the model verification device 100 according to the present disclosure is not limited to the above-mentioned hardware configuration and may have any other appropriate hardware configuration. For example, one or more of the various processes performed by the model verification device 100 may be realized by a processing circuit or an electronic circuit that is hardwired to realize the processes. [Model verification device] Next, a model verification device 100 according to an embodiment of the present disclosure will be described with reference to Figs. 5 to 8. In the following embodiment, an automobile control model M having two parameters, throttle and brake, as input and three parameters, vehicle speed, engine RPM, and gear, is verified to verify a specification φ "vehicle speed is always less than 100 from 0 to 29 seconds, or vehicle speed is always higher than 75 from 29 to 30 seconds (always [0,29] (speed<100)∨alw [29,30] Counterexample u that does not satisfy "(speed>75)" * is explored.
[0019] In addition, the accelerator and brake values are normalized to 0 to 100, respectively, and the two input parameters are set according to the constraint ψ "the accelerator and brake are not operated simultaneously (∧ i=1 Under this assumption, the model verification device 100 checks whether the output M(u (uthri=0 ∨ ubrki=0)) (i=1, , 5) of the model M satisfies the constraint ψ (where the sampling interval is 6 seconds) among the inputs u = (uthr1, ubrk1, uthr2, ubrk2, uthr3, ubrk3, uthr4, ubrk4, uthr5, ubrk5).* ) does not satisfy the specification φ. * Explore.
[0020] 5 is a block diagram showing a functional configuration of a model verification device 100 according to an embodiment of the present disclosure. As shown in FIG 5, the model verification device 100 includes a sample extraction unit 110, a space transformation unit 120, a counterexample determination unit 130, and a repetition control unit 140.
[0021] The sample extraction unit 110 extracts a sample x from the search space. The sample extraction unit 110 may initially extract a sample x randomly from the search space, and after obtaining an evaluation result for the sample x, extract a next sample x' according to a search algorithm based on the evaluation result.
[0022] In one embodiment, the search space may be a simple search space such as a hyperrectangle or hypercube suitable for application to a search algorithm such as a hill climbing method. In this embodiment, since a counterexample when two inputs, the accelerator and the brake, are sampled five times, the constrained search space U is a region on a 10-dimensional vector space. For this reason, the search space X without the constraint ψ may be set as, for example, a hypercube or hyperrectangle on a 10-dimensional vector space. For example, if the unconstrained search space X is a hypercube defined by a closed interval between [0,100] for the accelerator axis and [0,100] for the brake axis, the sample extraction unit 110 extracts points in the hypercube as samples x=(xthr1, xbrk1, xthr2, xbrk2, xthr3, xbrk3, xthr4, xbrk4, xthr5, xbrk5) and passes them to the space conversion unit 120.
[0023] The spatial transformation unit 120 transforms the extracted sample x into an input u on a constrained search space U by a constraint ψ for the model M, according to a predetermined transformation rule. That is, when the search region X is a hypercube or hyperrectangular prism that contains the constrained search region U, the transformation from the search region X to the constrained search region U can be defined as a proportional transformation, and the spatial transformation unit 120 transforms the sample x into the input u according to the predetermined proportional transformation, and passes it to the counterexample determination unit 130.
[0024] In one embodiment, the spatial transformation unit 120 may proportionally transform the sample x to the input u according to the axis priority given as a hyperparameter. Specifically, when the axis priority is specified to prioritize the accelerator axis, the spatial transformation unit 120 transforms the sample x=(xthr1, xbrk1, xthr2, xbrk2, xthr3, xbrk3, xthr4, xbrk4, xthr5, xbrk5) to the input u=(xthr1,0, xthr2,0, xthr3,0, xthr4,0, xthr5,0) as shown in FIG. 6, and transforms the sample x to a point on the accelerator axis of the constrained search space.
[0025] In addition, if the axis priority is specified to give priority to the brake axis, the spatial transformation unit 120 transforms the sample x = (xthr1, xbrk1, xthr2, xbrk2, xthr3, xbrk3, xthr4, xbrk4, xthr5, xbrk5) to u = (0, xbrk1, 0, xbrk2, 0, xbrk3, 0, xbrk4, 0, xbrk5) as shown in Figure 7, and transforms the sample x to a point on the brake axis in the constrained search domain.
[0026] However, the axis priority given as a hyperparameter does not have to be defined as either the accelerator axis or the brake axis, and the axis priority may be defined for each sample. For example, as shown in Figure 8, samples 1 and 2 may be converted to the accelerator axis, and samples 3, 4, and 5 may be converted to the brake axis.
[0027] The counterexample determination unit 130 determines whether the output M(u) of the model M for the input u satisfies the specification φ, and if the output M(u) does not satisfy the specification φ, sets the input u as a counterexample u. * Specifically, the counterexample determination unit 130 simulates the model M for the input u acquired from the space transformation unit 120, and acquires the output M(u). For example, when the model M is an automobile control model, the model M outputs a parameter value such as a vehicle speed for an input u of an accelerator value or a brake value that satisfies the constraint condition ψ.
[0028] In one embodiment, upon obtaining an output M(u) of the model M, the counterexample determiner 130 may determine the degree of fulfillment of the output M(u) with respect to the specification φ using a robustness function r that derives the degree of fulfillment of the specification φ from the output M(u) and the specification φ. Here, the robustness function r may be any suitable function that outputs a value indicating the degree to which the output M(u) fulfills the specification φ. When the robustness value falls below a predetermined threshold, such as 0, the input u does not fulfill the specification φ and a counterexample u is determined. * On the other hand, when the robustness value is equal to or greater than the predetermined threshold and has a relatively large value, the input u is determined to satisfy the specification φ with a high degree of fulfillment, and when the robustness value is equal to or greater than the predetermined threshold but has a relatively small value, the input u is determined to satisfy the specification φ but with a low degree of fulfillment.
[0029] For example, such a robustness function r is
[0030]
number
[0031] If the output M(u) does not satisfy the specification φ, the counterexample determination unit 130 determines the detected u as a counterexample u * and determines that the model M does not satisfy the specification φ. On the other hand, if the output M(u) satisfies the specification φ, the counterexample determination unit 130 notifies the iterative control unit 140 that the output M(u) satisfies the specification φ, together with a robustness value indicating the degree of satisfaction of the output M(u).
[0032] If the output M(u) satisfies the specification φ, the repetitive control unit 140 controls the repetitive process of having the sample extraction unit 110 extract the next sample x' from the search space according to a predetermined search algorithm and activating the space transformation unit 120 and the counterexample determination unit 130 for the extracted sample x'. Specifically, if the output M(u) satisfies the specification φ, the repetitive control unit 140 passes the robustness value r of the output M(u) to the sample extraction unit 110, and the sample extraction unit 110 extracts the next sample x' based on the robustness value r according to the predetermined search algorithm.
[0033] Here, a search algorithm such as a hill climbing method is typically applied to a search space without constraints, and may not be suitable for use in a constrained search space U. For this reason, in the present disclosure, instead of applying a search algorithm in the constrained search space U, a search algorithm is applied in a search space X such as a hypercube or a hyperrectangle, and the extracted samples are converted to points on the constrained search space U by proportional conversion.
[0034] For example, when a hill-climbing method is used as the predetermined search algorithm, the sample extraction unit 110 extracts the current sample x i From the next sample x in the direction in which the robustness value r decreases the most i+1 The sample extraction unit 110 may also search for the current sample x i Not only past samples x i-j ,x i-j+1 ,···,x i=1 ,x i Based on the history of the next sample x i+1 For example, we can extract the past sample x i-j ,x i-j+1 ,···,x i=1 ,x i Based on the regression of the next sample x i+1 may be extracted.
[0035] The repetitive control unit 140 activates the spatial transformation unit 120 and the counterexample determination unit 130 to repeat the above-mentioned processing in the spatial transformation unit 120 and the counterexample determination unit 130 for the next sample x′ extracted by the sample extraction unit 110. * is detected or a predetermined end condition is satisfied. Here, the predetermined end condition may be, for example, until the repeated process is terminated for a predetermined number of samplings. [Model verification process] Next, a model verification process according to an embodiment of the present disclosure will be described with reference to Fig. 9. In the following model verification process, a counter example u(u) that generates an output M(u) of a model M that does not satisfy a specification ψ in a search space U constrained by a constraint ψ is* is searched for. The model verification process is executed by the above-described model verification device 100, and can be realized, for example, by one or more processors executing a program stored in one or more memories of the model verification device 100. Fig. 9 is a flowchart showing the model verification process according to an embodiment of the present disclosure.
[0036] 9, in step S101, the model verification device 100 extracts a sample x from a search space X. For example, the search space X may be a hypercube or a hyperrectangle having the same dimensions as the sample x, which is suitable for applying a search algorithm. Initially, the model verification device 100 may randomly extract the sample x from the search space X.
[0037] In step S102, the model verification device 100 transforms the sample x into a point u in the constrained search space U according to a transformation rule. For example, the transformation rule is a surjection that maps any point in the search space X to any point in the constrained search space U according to the constraint ψ, and may be, for example, a proportional transformation. When the transformation rule is a proportional transformation, the model verification device 100 transforms each component x of the sample x into a point u in the constrained search space U according to the axis priority given as a hyperparameter. k In the above specific example of the accelerator and brake, when the constrained search space U is composed of regions on the axis, the model verification apparatus 100 converts each component x of the sample x into k to a point on the accelerator or brake axis.
[0038] Specifically, when sample x = (xthr1, xbrk1, xthr2, xbrk2, xthr3, xbrk3, xthr4, xbrk4, xthr5, xbrk5) and hyperparameters that prioritize the accelerator axis (for example, (1, 0, 1, 0, 1, 0, 1, 0, 1, 0)), the model verification device 100 proportionally converts sample x to u = (xthr1, 0, xthr2, 0, xthr3, 0, xthr4, 0, xthr5, 0).
[0039] Furthermore, when sample x = (xthr1, xbrk1, xthr2, xbrk2, xthr3, xbrk3, xthr4, xbrk4, xthr5, xbrk5) and hyperparameters that prioritize the brake axis (for example, (0, 1, 0, 1, 0, 1, 0, 1, 0, 1)), the model verification device 100 proportionally converts sample x to u = (0, xbrk1, 0, xbrk2, 0, xbrk3, 0, xbrk4, 0, xbrk5).
[0040] Furthermore, when sample x = (xthr1, xbrk1, xthr2, xbrk2, xthr3, xbrk3, xthr4, xbrk4, xthr5, xbrk5) and hyperparameters (1, 0, 0, 1, 0, 1, 1, 0, 1, 0), the model verification device 100 proportionally converts sample x to u = (xthr1, 0, 0, xbrk2, 0, xbrk3, xthr4, 0, xthr5, 0).
[0041] When the search space X is composed of a normalized hypercube or the like, the hyperparameters may be multiplied by a scalar as appropriate.
[0042] In step S103, the model verification device 100 judges whether the output M(u) from the model M satisfies the specification φ. For example, in the specific example of the accelerator and brake described above, the model verification device 100 simulates the model M for the input u, and judges whether the output M(u) from the model M satisfies the specification φ (the vehicle speed is always less than 100 from 0 to 29 seconds, or the vehicle speed is always higher than 75 from 29 to 30 seconds (always [0,29] (speed<100)∨alw [29,30] (speed>75)" is satisfied. Output M(u * ), if the vehicle speed is 100 or more in the period from 0 to 29 seconds, or is 75 or less in the period from 29 to 30 seconds, the model verification device 100 verifies that the input u *is determined as a counterexample of model M, and it is determined that model M does not satisfy the specification φ. On the other hand, if, according to the output M(u) for any tried input u, the vehicle speed is less than 100 from 0 to 29 seconds and exceeds 75 from 29 to 30 seconds, the model verification device 100 determines that model M satisfies the specification φ.
[0043] Furthermore, the model verification device 100 may determine the degree of satisfaction of the output M(u) with respect to the specification φ by using a robustness function r that derives the degree of satisfaction of the specification φ from the output M(u) and the specification φ. For example, the model verification device 100 may determine that the output M(u) satisfies the specification φ when a robustness value indicating the degree of satisfaction of the output M(u) with respect to the specification φ is equal to or greater than a predetermined threshold (e.g., 0), and may determine that the output M(u) does not satisfy the specification φ when the robustness value is less than the predetermined threshold.
[0044] If the output M(u) does not satisfy the specification φ (S103: NO), the model verification device 100 determines the input u as a counterexample in step S104, determines that the model M does not satisfy the specification φ, and terminates the model verification process.
[0045] On the other hand, if the output M(u) satisfies the specification φ (S103: YES), the model verification device 100 determines in step S105 whether the termination condition of the model verification process is satisfied. If the termination condition is satisfied (S105: YES), the model verification device 100 determines that the model M satisfies the specification φ, and terminates the model verification process.
[0046] On the other hand, if the termination condition is not satisfied (S105: NO), the model verification device 100 returns to step S101 and extracts the next sample x' from the search space X. At this time, the model verification device 100 may extract the next sample x' according to a search algorithm based on the sufficiency of the output M(u) of the model M for the sample x. For example, if a hill-climbing method is used as the search algorithm, the model verification device 100 may extract the next sample x' in the direction in which the sufficiency or robustness value decreases the most. Also, the model verification device 100 may extract the next sample x' from the current sample x. i Not only past samples x i-j ,···,x i Using the history of, the next sample x i+1 may be extracted.
[0047] Although the embodiments of the present invention have been described in detail above, the present invention is not limited to the specific embodiments described above, and various modifications and variations are possible within the scope of the gist of the present invention as defined in the claims. [Explanation of symbols]
[0048] 100 Model verification device 110 Sample Extraction Section 120 Spatial conversion section 130 Counterexample determination section 140 Repeat control section
Claims
1. a sample extractor for extracting a sample x from the search space; a space transformation unit that transforms the extracted sample x into an input u on a search space constrained by a constraint ψ for a model M according to a predetermined transformation rule; a counterexample determination unit that determines whether an output M(u) of the model M for the input u satisfies a specification φ, and determines the input u as a counterexample if the output M(u) does not satisfy the specification φ; A model verification apparatus comprising:
2. the search space is constructed from a hypercube or a hyperrectangle; 2. The model verification apparatus according to claim 1, wherein the predetermined transformation rule is a proportional transformation.
3. 3. The model verification apparatus according to claim 1, further comprising a repetition control unit that controls a repetition process in which, if the output M(u) satisfies the specification φ, the sample extraction unit extracts a next sample x' from the search space in accordance with a predetermined search algorithm, and the space transformation unit and the counterexample determination unit are activated for the extracted sample x'.
4. 4. The model verification apparatus according to claim 3, wherein the iterative control unit activates the iterative process until the counterexample is detected or a predetermined termination condition is satisfied.
5. 5. The model verification device according to claim 1, wherein the counterexample determination unit determines a degree of fulfillment of the output M(u) with respect to the specification φ by using a robustness function r that derives a degree of fulfillment of the specification φ from the output M(u) and the specification φ.
6. the predetermined search algorithm is a hill climbing method; 6. The model verification apparatus according to claim 5, wherein the sample extraction section extracts the next sample x' based on a history of robustness values for the sample x.
7. A processor extracting a sample x from a search space; the processor transforming the extracted samples x into inputs u on a search space constrained by constraints ψ on a model M according to a predetermined transformation rule; The processor determines whether an output M(u) of the model M for the input u satisfies a specification φ, and if the output M(u) does not satisfy the specification φ, determines the input u as a counterexample; A model validation method comprising:
Citation Information
Patent Citations
Multipurpose optimization design support apparatus and method considering geometric characteristics of design object shape, and program
JP2011008675A
Calculation device and calculation method
JP2014209274A
Program inspection device, software inspection device, sat constraint condition data, and storage medium
JP2016057969A
Coverage Based Pairwise Test Set Generation for Verification of Electronic Designs
US20130007680A1
Temporal logic robustness guided testing for cyber-physical systems
US20160292307A1
