riemann sum
Riemann Sum Optimization for Accurate Integrated Gradients Computation
Integrated Gradients (IG) is a widely used algorithm for attributing the outputs of a deep neural network to its input features. Due to the absence of closed-form integrals for deep learning models, inaccurate Riemann Sum approximations are used to calculate IG. This often introduces undesirable errors in the form of high levels of noise, leading to false insights in the model's decision-making process. We introduce a framework, RiemannOpt, that minimizes these errors by optimizing the sample point selection for the Riemann Sum. Our algorithm is highly versatile and applicable to IG as well as its derivatives like Blur IG and Guided IG. RiemannOpt achieves up to 20% improvement in Insertion Scores. Additionally, it enables its users to curtail computational costs by up to four folds, thereby making it highly functional for constrained environments.
A Shapley Value Estimation Speedup for Efficient Explainable Quantum AI
Burge, Iain, Barbeau, Michel, Garcia-Alfaro, Joaquin
This work focuses on developing efficient post-hoc explanations for quantum AI algorithms. In classical contexts, the cooperative game theory concept of the Shapley value adapts naturally to post-hoc explanations, where it can be used to identify which factors are important in an AI's decision-making process. An interesting question is how to translate Shapley values to the quantum setting and whether quantum effects could be used to accelerate their calculation. We propose quantum algorithms that can extract Shapley values within some confidence interval. Our method is capable of quadratically outperforming classical Monte Carlo approaches to approximating Shapley values up to polylogarithmic factors in various circumstances. We demonstrate the validity of our approach empirically with specific voting games and provide rigorous proofs of performance for general cooperative games. As Artificial Intelligence (AI) becomes a larger part of critical decision-making processes, it is important to understand the logic behind the decisions being made. Transparency in AI has become a topic of substantial regulatory importance worldwide. In the European Union, the General Data Protection Regulation (GDPR) provides citizens the right to explanations for impactful automated decisions which relate to personal data [1]. More recently, in 2024, the European Union enacted the AI act. The AI act provides individuals, in the context of high-risk AI systems, the right to an explanation for: (i) the use of an AI system in the decision-making process; (ii) the most important elements of that decision [2]. NIST's plan listed explainability as an aspect of trustability, which is one of their key areas of focus. This wave of legislative attention poses a substantial challenge, as many of today's state-of-the-art AI algorithms, such as deep learning models, are unexplainable black boxes [4]. Without specialized tools, AI developers often cannot understand the reasoning of their models.
An Idiosyncrasy of Time-discretization in Reinforcement Learning
De Asis, Kris, Sutton, Richard S.
Many reinforcement learning algorithms are built on an assumption that an agent interacts with an environment over fixed-duration, discrete time steps. However, physical systems are continuous in time, requiring a choice of time-discretization granularity when digitally controlling them. Furthermore, such systems do not wait for decisions to be made before advancing the environment state, necessitating the study of how the choice of discretization may affect a reinforcement learning algorithm. In this work, we consider the relationship between the definitions of the continuous-time and discrete-time returns. Specifically, we acknowledge an idiosyncrasy with naively applying a discrete-time algorithm to a discretized continuous-time environment, and note how a simple modification can better align the return definitions. This observation is of practical consideration when dealing with environments where time-discretization granularity is a choice, or situations where such granularity is inherently stochastic.
On Integral Theorems: Monte Carlo Estimators and Optimal Functions
We introduce a class of integral theorems based on cyclic functions and Riemann sums approximating integrals theorem. The Fourier integral theorem, derived as a combination of a transform and inverse transform, arises as a special case. The integral theorems provide natural estimators of density functions via Monte Carlo integration. Assessments of the quality of the density estimators can be used to obtain optimal cyclic functions which minimize square integrals. Our proof techniques rely on a variational approach in ordinary differential equations and the Cauchy residue theorem in complex analysis.
Essential Math for Data Science: Integrals And Area Under The Curve - KDnuggets
Calculus is a branch of mathematics that gives tools to study the rate of change of functions through two main areas: derivatives and integrals. In the context of machine learning and data science, you might use integrals to calculate the area under the curve (for instance, to evaluate the performance of a model with the ROC curve, or to calculate probability from densities. In this article, you'll learn about integrals and the area under the curve using the practical data science example of the area under the ROC curve used to compare the performances of two machine learning models. Building from this example, you'll see the notion of the area under the curve and integrals from a mathematical point of view (from my book Essential Math for Data Science). Let's say that you would like to predict the quality of wines from various of their chemical properties. You want to do a binary classification of the quality (distinguishing very good wines from not very good ones). You'll develop methods allowing you to evaluate your models considering imbalanced data with the area under the Receiver Operating Characteristics (ROC) curve.
Monte Carlo integration in Python
And it is in this higher dimension that the Monte Carlo method particularly shines as compared to Riemann sum based approaches. We introduced the concept of Monte Carlo integration and illustrated how it differs from the conventional numerical integration methods. We also showed a simple set of Python codes to evaluate a one-dimensional function and assess the accuracy and speed of the techniques. The broader class of Monte Carlo simulation techniques is more exciting and is used in a ubiquitous manner in fields related to artificial intelligence, data science, and statistical modeling. For example, the famous Alpha Go program from DeepMind used a Monte Carlo search technique to be computationally efficient in the high-dimensional space of the game Go. Numerous such examples can be found in practice.