Explainable Artificial Intelligence Archives - ESRD https://www.esrd.com/tag/explainable-artificial-intelligence/ Engineering Software Research and Development, Inc. Fri, 19 Jan 2024 22:41:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 https://www.esrd.com/wp-content/uploads/cropped-SC_mark_LG72ppi-32x32.jpg Explainable Artificial Intelligence Archives - ESRD https://www.esrd.com/tag/explainable-artificial-intelligence/ 32 32 A Low-Hanging Fruit: Smart Engineering Simulation Applications https://www.esrd.com/low-hanging-fruit-smart-engineering-simulation-apps/ https://www.esrd.com/low-hanging-fruit-smart-engineering-simulation-apps/#respond Fri, 19 Jan 2024 14:30:27 +0000 https://www.esrd.com/?p=30799 Smart Engineering Simulation Applications, (SESA or Sim Apps), are software tools crafted by expert analysts to standardize recurring simulation tasks. Learn more about how Sim Apps and AI tools can work together to enhance engineering simulation workflows.]]>

By Dr. Barna Szabó
Engineering Software Research and Development, Inc.
St. Louis, Missouri USA


Smart Engineering Simulation Applications, (SESA or Sim Apps), are software tools crafted by expert analysts to standardize recurring simulation tasks. Sim Apps encapsulate expert knowledge and provide important advantages: (a) Help streamline decisions pertaining to design and certification, (b) Ensure the reliability and consistency of results, (c) Provide transparency, (d) Make simulation tools accessible to users whose expertise is in other fields, and (e) Serve to accumulate and preserve tribal knowledge.

The key requirements of explainable artificial intelligence (XAI) are reliability and transparency. In the context of Sim Apps, reliability means: (a) The model form error is within acceptable tolerances, (b) the data and parameters are within the domain of calibration, and (c) code, data, and solution verification are performed. Transparency means the ability to independently and objectively assess the trustworthiness of predictions. Transparency implies traceability and auditability.

ESRD developed and successfully deployed Sim Apps designed to improve engineering workflows concerned with the application of design rules. This involves either the selection of design parameters, such that a structural or mechanical component has a positive margin of safety, given a particular loading condition, or certifying that a component, characterized by a set of parameters, conforms with the applicable design rules, given a loading condition.

Deployment Through AI Tools

Augmented Language Model (ALM) is a term that refers to various techniques aimed at addressing the limitations of standard Large Language Models (LLMs), such as Microsoft’s Bing and Google’s Bard. ALMs enhance the capabilities of LLMs by augmenting them with the ability to use software tools, as well as the information necessary to correctly understand the output of those tools. Properly designed and implemented Sim Apps are ideally suited for this purpose.

Use Case

The following use case illustrates how users will interact with ALMs: The user states a problem in English professional language. For example: “I am interested in estimating the strength of a composite Pi joint with partial delamination. My goal is to estimate whether the delamination will increase, given a loading condition. I need to calculate the energy release rate along the delamination fronts.” Problems like this occur, for example, when making disposition decisions in condition-based maintenance. The ALM responds by recommending one or more expert-designed applications and providing an interface with access to the relevant documentation, and examples, as indicated in Fig. 1.

Figure 1: User interface of an expert-designed Sim App.

This figure shows a Sim App, developed by ESRD and available as a COTS tool. The user, who is not required to have expertise in numerical simulation, replaces the default model parameters with the applicable dimensions, material properties, stacking sequence, and loads. The parameters are restricted to permissible values. The solution process is initiated next. This process, performed automatically, produces the quantity of interest (QoI), in the present case the energy release rate associated with the delamination front, and an error estimation in terms of the QoI. In other words, solution verification is built into the application. Finally, the Sim App produces a report which contains the results and all records relevant to the analysis.

In formulating Sim Apps, the expert designer is responsible for controlling the model form errors and for setting limits on the parameters so that the Sim App can be used only within the domain of calibration of the model. Solution verification is provided by the Sim App and the user is advised of the size of the estimated approximation error in the quantities of interest. The conceptual and theoretical basis of this process is available in [1].

ESRD has developed and successfully deployed Sim Apps based on the scientific principles of finite element analysis (as opposed to the art of finite element modeling) that is fully capable of being augmented in LLMs. One should think of these applications as engineering handbooks on steroids: The essential difference between ESRD’s Sim Apps and classical engineering handbooks is that classical handbooks present results for parameterized problems that can be solved by classical methods. This severely limits the complexity of problems, consequently, users rarely find the problems they are truly interested in solving. Whereas the classical solutions are highly accurate, the limitations force users to interpolate between entries. This typically leads to large model form errors.

In contrast, ESRD’s Sim Apps produce verified FEA solutions for parameterized models. This enables the standardization of more complex models, offering reliability and accuracy on par with traditional engineering handbooks.

The Role of Generative AI

Generative AI can be trained to connect problem statements with the available solutions. Training will require curating and labeling items in the documentation of Sim Apps. The importance of proper training is highlighted by the following example:

In July 2023, I asked Microsoft Bing the following question: Is it correct to say: “finite element modeling is to numerical simulation like astrology is to astronomy”?

Bing replied:

Yes, it is correct to say that “finite element modeling is to numerical simulation like astrology is to astronomy”. The analogy is used to describe the difference between the two methods. Finite element modeling is a subset of numerical simulation that uses a mesh of small elements to approximate the solution of a differential equation. Numerical simulation is a more general term that includes other methods such as finite difference and finite volume methods. Similarly, astrology is a subset of astronomy that uses celestial objects’ positions and movements to predict human affairs. Astronomy is a more general term that includes other methods such as astrophysics and cosmology.

My response:

You gave the correct answer “yes” but your explanation was wrong: Finite element modeling is not a subset of numerical simulation and astrology cannot be a subset of astronomy because astrology is not a scientific field.

Bing replied:

I’m sorry if my previous response was not helpful. I’m still learning so I appreciate your understanding and patience.

I asked the same question six months later. This time Bing correctly distinguished between astrology and astronomy but was confused about the relationship between finite element modeling and numerical simulation.  Clearly, there is much more training to do. For information on the present state of AI, and the direction of its evolution, I recommend an excellent lecture by Professor Michael Wooldridge on the future of generative AI [2].


References

[1] Szabό, B. and Babuška, I. Finite Element Analysis. Method, Verification, and Validation. John Wiley & Sons, Inc., 2021.

[2] Wooldridge, M. The Turing Lectures: The future of generative AI (December 2023).  Video recording.  https://www.youtube.com/watch?v=b76gsOSkHB4&t=3270s.


Related Blogs:

]]>
https://www.esrd.com/low-hanging-fruit-smart-engineering-simulation-apps/feed/ 0
Why Worry About Singularities? https://www.esrd.com/why-worry-about-singularities/ https://www.esrd.com/why-worry-about-singularities/#respond Thu, 14 Dec 2023 21:01:08 +0000 https://www.esrd.com/?p=30564 A mathematician delivered a keynote presentation at an engineering conference some years ago. At the coffee break, following the presentation, a highly respected senior developer of a legacy finite element code, remarked: “I do not understand why the speaker was so worried about singularities. We never see them.” The remark highlights the lack of a common language between the pre-scientific notion of finite element modeling and finite element analysis, which is a branch of applied mathematics. Read why mathematicians and engineers alike should "worry" about singularities.]]>

By Dr. Barna Szabó
Engineering Software Research and Development, Inc.
St. Louis, Missouri USA


A mathematician delivered a keynote presentation at an engineering conference some years ago. At the coffee break, following the presentation, a highly respected senior developer of a legacy finite element code, remarked: “I do not understand why the speaker was so worried about singularities. We never see them.”

In the context of the keynote presentation, singularities were understood to be properties of the exact solutions of mathematical problems approximated by the finite element method. Singularities occur in points where the exact solution lacks differentiability or analyticity. The remark, on the other hand, was in the context of finite element modeling where a numerical problem is constructed without considering the underlying mathematical problem. The remark highlights the lack of a common language between the pre-scientific notion of finite element modeling and finite element analysis, which is a branch of applied mathematics.

Why Do Mathematicians Worry About Singularities?

Mathematicians understand finite element analysis (FEA) as a method for obtaining an approximation to the exact solution of a well-defined mathematical problem, such as a problem of elasticity, cast in variational form. Specifically, the finite element solution uFE converges to the exact solution uEX in a norm (which depends on the variational form) as the number of degrees of freedom N is increased. An important question is, how fast does it converge?  For most practical problems, convergence is quantified by the inequality:

||\boldsymbol u_{EX} -\boldsymbol u_{FE}||_E \le \frac{C}{N^{\beta}}  \quad (1)

where on the left is the energy norm measure of the difference between the exact and the finite element solution (which is closely related to the root-mean-square error in stress), C and β are positive constants, and β is called the rate of convergence. The size of β depends on the regularity (smoothness) of uEX and on the scheme used for increasing N. The details are available in textbooks, see (for example) [1].  The smoothness of uEX is quantified by a positive number λ. In many practical problems 0 < λ < 1.

For instance, consider the two-dimensional elasticity problem on the L-shaped domain, a frequently used benchmark problem, where λ equals 0.544. This is a manufactured problem with a known exact solution, allowing for the calculation of approximation errors [2].

Referring to Figure 1, if uniform mesh refinement is used at a fixed polynomial degree (h-extension) then β = λ/2 = 0.274. If the polynomial degree is increased on a fixed uniform mesh (p-extension) then β = λ = 0.544. If p-extension is used on a mesh that is graded in a geometric progression toward the singular point then, for large N, we still have β = λ = 0.544, however, convergence is much stronger at small N values.

Assume that we wish to reduce the relative error in energy norm to 1 percent. If we increase the polynomial degree uniformly (p-extension), on a geometrically graded mesh then we have to solve less than 103 simultaneous equations. In contrast, if we use a uniform mesh refinement and p = 2  (h-extension) then we have to solve about 107 equations. The ratio is roughly 104. It took less than one second on a desktop computer to solve 103 equations. If we assume that the solution time is proportional to the number of degrees of freedom squared, then achieving 1% relative error with uniform mesh refinement would take 108 seconds or 3.2 years. This shows that the errors of approximation can be controlled only through proper design of the discretization scheme, which involves taking the characteristics of the underlying mathematical problem into consideration.

Figure 1: The L-shaped domain problem. Convergence curves for uniform mesh refinement at a fixed polynomial degree (h-extension), increasing polynomial degree on a fixed uniform mesh (p-extension), and increasing polynomial degree on a geometrically graded fixed finite element mesh consisting of 18 elements.

Why Should Engineers Worry About Singularities?

If the solution of the underlying mathematical problem has singular points, as in the case of the L-shaped domain problem, then the goal of the computation cannot be the determination of the maximum stress. The finite element solution predicts finite values for stress, however, the predicted stress increases as N is increased. The error in the maximum stress is infinitely large even if the root-mean-square error in stress on the entire domain is negligibly small. This is illustrated in Figure 2 where the von Mises stress corresponding to the finite element solution on the 18-element geometrically graded mesh and p = 8 is displayed.

In engineering applications of the finite element method, small geometric features, such as fillets, are often neglected, resulting in sharp corners and edges. This may be permissible outside of the domain of primary interest, however, the quantities of interest within the domain of primary interest may be polluted by errors coming from singular points or edges [3].

Figure 2: Contours of the von Mises stress corresponding the finite element solution on an 18-element geometrically graded mesh, p=8.

In this model problem, the singularity was caused by a sharp corner. Singularities can be caused by abrupt changes in material properties, loading, and constraint conditions as well.

Outlook

A high level of expertise is required for properly designing a discretization scheme. Experts take into consideration the information contained in the input data and use that information to estimate the regularity of the exact solution. This guides the design of the finite element mesh and the assignment of polynomial degrees.  Feedback information can be utilized to revise and update the discretization scheme when necessary [4].

Explainable artificial intelligence (XAI) tools can provide high-quality guidance in the design of the initial discretization, based on the information content of the input data, and in the management of feedback information. It’s essential, that these tools be trained on the scientific principles of finite element analysis.


References

[1] Szabό, B. and Babuška, I. Finite Element Analysis: Method, Verification and Validation., 2nd ed. John Wiley & Sons, Inc., 2021.

[2] Szabό, B. and Babuška, I. Finite Element Analysis. John Wiley & Sons, Inc., 1991.

[3] Babuška, I., Strouboulis, T., Upadhyay, C.S. and Gangaraj, S.K. A posteriori estimation and adaptive control of the pollution error in the h‐version of the finite element method. International Journal for Numerical Methods in Engineering, 38(24), pp. 4207-4235, 1995.

[4] Babuška, I. and Rank, E. An expert-system-like feedback approach in the hp-version of the finite element method. Finite Elements in Analysis and Design, 3(2), pp.127-147, 1987.


Related Blogs:

]]>
https://www.esrd.com/why-worry-about-singularities/feed/ 0