Ziyad Oulhaj
email: ziyad.oulhaj@ec-nantes.fr

Mathieu Carrière
email: mathieu.carriere@inria.fr

Bertrand Michel
email: bertrand.michel@ec-nantes.fr

DIFFERENTIABLE MAPPER FOR TOPOLOGICAL OPTIMIZATION OF DATA REPRESENTATION

Keywords: Mapper Graph, Data Visualization, Topological Data Analysis, Persistent Homology

Unsupervised data representation and visualization using tools from topology is an active and growing field of Topological Data Analysis (TDA) and data science. Its most prominent line of work is based on the so-called Mapper graph, which is a combinatorial graph whose topological structures (connected components, branches, loops) are in correspondence with those of the data itself. While highly generic and applicable, its use has been hampered so far by the manual tuning of its many parameters-among these, a crucial one is the so-called filter: it is a continuous function whose variations on the data set are the main ingredient for both building the Mapper representation and assessing the presence and sizes of its topological structures. However, while a few parameter tuning methods have already been investigated for the other Mapper parameters (i.e., resolution, gain, clustering), there is currently no method for tuning the filter itself. In this work, we build on a recently proposed optimization framework incorporating topology to provide the first filter optimization scheme for Mapper graphs. In order to achieve this, we propose a relaxed and more general version of the Mapper graph, whose convergence properties are investigated. Finally, we demonstrate the usefulness of our approach by optimizing Mapper graph representations on several datasets, and showcasing the superiority of the optimized representation over arbitrary ones.

Introduction

Mapper graphs and TDA. The Mapper graph introduced in [START_REF] Singh | Topological methods for the analysis of high dimensional data sets and 3d object recognition[END_REF] is an essential tool of Topological Data Analysis (TDA), and has been used many times for visualization purposes on different types of data, including, but not limited to, single-cell sequencing [START_REF] Wang | Topological methods for visualization and analysis of high dimensional single-cell rna sequencing data[END_REF][START_REF] Zechel | Topographical transcriptome mapping of the mouse medial ganglionic eminence by spatially resolved rna-seq[END_REF], neural network architectures [START_REF] Mitra | Experiments on fraud detection use case with qml and tda mapper[END_REF][START_REF] Joseph | Topological data analysis in conjunction with traditional machine learning techniques to predict future mdap pm ratings[END_REF], or 3D meshes [START_REF] Wang | Exploration of topological data analysis in 3d printing[END_REF][START_REF] Rosen | Inferring quality in point cloud-based 3d printed objects using topological data analysis[END_REF]. Moreover, its ability to precisely encode (within the graph) the presence and sizes of geometric and topological structures in the data in a mathematically founded way (through the use of algebraic topology) has also proved beneficial for highlighting subpopulations of interest, which are usually detected as peculiar topological structures of significant sizes, and identifying the key features that best explain such subpopulations against the rest of the Mapper graph. This general pipeline has become a key component in, e.g., biological inference in single-cell data sets, where differentiating stem cells can usually be recovered from branching patterns in the corresponding Mapper graphs [START_REF] Rizvi | Single-cell topological RNA-seq analysis reveals insights into cellular differentiation and development[END_REF].

Parameter selection. However, it has quickly become clear that the Mapper graph is quite sensitive to its parameters, in the sense that the structure of the graph can vary a lot under (even small) changes of its parameters. As such, several pipelines based on Mapper graphs actually involve brute force optimization: they first compute a grid of Mapper graphs corresponding to many different sets of parameters, and then they pick the best one, either by manual inspection or with arbitrary criteria-leading to prohibitive running times. In order to deal with this issue, several methods have been proposed in the literature for either assessing the statistical robustness of a given Mapper graph with respect to the distribution of the studied dataset [START_REF] Belchí | A numerical measure of the instability of mapper-type algorithms[END_REF][START_REF] Brown | Probabilistic convergence and stability of random Mapper graphs[END_REF], or for tuning the Mapper parameters automatically [START_REF] Carriere | Statistical analysis and parameter selection for mapper[END_REF]. Unfortunately, most tuning methods involve simple heuristics that only work for some, but not all Mapper parameters; in particular, the so-called filter parameter has never been treated, to the best of our knowledge. This is mostly because it is a general continuous function, and can thus vary in a much wilder parameter space than the other Mapper parameters.

In another line of work, ensemble methods have recently been proposed to combine Mapper graphs over multiple parameter sets, rather than trying to find the best one [START_REF] Sung | Ensemble mapper[END_REF][START_REF] Fitzpatrick | Ensemble learning for mapper parameter optimization[END_REF], so as to be able to produce outputs that are more robust. However, this imposes to aggregate families of completely different filter functions, with no guarantees on the resulting graph. In this work, we follow a different approach, and rather attempt at identifying an "optimal" filter function by minimizing specific loss functions.

Another approach related to our work is [START_REF] Bui | F-mapper: A fuzzy mapper clustering algorithm[END_REF], where an alternative way of constructing Mapper graphs is proposed using a fuzzy clustering algorithm. Even though we also adopt a probabilistic approach (that allows, e.g., a point to belong to disconnected intervals in the cover of the filter range), the underlying probabilistic formalism that we use is new, while there is none in [START_REF] Bui | F-mapper: A fuzzy mapper clustering algorithm[END_REF]. In particular, we introduce stochastic assignment schemes and we address the parameter selection problem within this framework.

Contributions. Our contribution is three-fold:

• We introduce Soft Mapper: a generalization of the combinatorial Mapper graph in the form of a probability distribution on Mapper graphs,

• We propose a filter optimization framework adapted to a smooth Soft Mapper distribution with provable convergence guarantees,

• We implement and showcase the efficiency of Mapper filter optimization through Soft Mapper on various data sets, with public, open-source code in TensorFlow.

The following of the article is organized as follows: in Section 2 we recall the basics on the Mapper algorithm, then in Section 3 we detail the Soft Mapper construction, which is the main focus of this work. We provide several interesting special cases of Soft Mapper in Section 4, before introducing topological losses that are specific to Mapper graphs in Section 5. We then present our optimization setting, in which a parameterized family of Mapper filter functions is optimized, in Section 6, and we apply it on 3-dimensional shapes and single cell RNA-sequencing data in Section 7. Finally, we discuss the results of this article and present possible future work directions in Section 8.

Background on Reeb and Mapper graphs

Reeb graphs. Mapper graphs can be understood as numerical approximations of Reeb graphs, that we now define. Let X be a topological space and let f : X → R be a continuous function called filter function. Let ∼ f be the equivalence relation between two elements x and y in X defined by: x ∼ f y if and only if x and y are in the same connected component of f -1 (z) for some z in f (X). The Reeb graph R f (X) of X is then simply defined as the quotient space X/ ∼ f .

Mapper graphs. The Mapper was introduced in [START_REF] Singh | Topological methods for the analysis of high dimensional data sets and 3d object recognition[END_REF] as a discrete and computable version of the Reeb graph R f (X ).

Assume that we are given a point cloud X n = {X 1 , . . . , X n } ⊆ X with known pairwise dissimilarities, as well as a filter function f computed on each point of X n . The Mapper graph can then be computed with the following generic version of the Mapper algorithm:

Soft Mapper construction

In this section, we introduce our new construction Soft Mapper, which generalizes Mapper graphs and can be used for non-convex optimization. In order to do so, we first provide a general formalization of the Mapper construction that does not require overlapping intervals and filter functions. Then, we use this formalization to define Soft Mapper, which essentially consists in a distribution on regular Mapper graphs.

Mapper graphs built on latent cover assignments

Let X n = {x 1 , ..., x n } be a point cloud lying in a metric space (X, d) and let r ∈ N ⋆ . For instance, X n can be obtained from sampling X n according to some distribution µ. Then, let Clus be a clustering algorithm on (X, d), that is assumed to be fixed in the following of this work.

Latent cover assignments. Any binary matrix e ∈ {0, 1} n×r is then called an r-latent cover assignment of X n , where e i,j = 1 must be understood as point x i belonging to the j-th element of a latent cover of the data. For instance, in the standard version of Mapper presented in Section 2, the latent cover is obtained from a family of pre-images of intervals that cover the range of the filter function.

The procedure to compute a Mapper graph given an r-latent cover assignment e ∈ {0, 1}

n×r is straightforward: simply replace f -1 (I j ) by {x i : e i,j = 1} in the generic Mapper algorithm in Section 2, then derive the pullback cover using the clustering algorithm Clus, and finally compute the Mapper graph as the nerve of the pullback cover.

Mapper function. Let K be the set of simplicial complexes of dimension less or equal to 1 (i.e., graphs) and such that their sets of vertices (i.e., their 0-skeletons) are subsets of the power set P(X n ). We define the Mapper complex generating function as:

MapComp : {0, 1} n×r -→ K,
where MapComp takes a latent cover assignment as input and creates the corresponding Mapper graph.

Cover assignment scheme and Soft Mapper

Now, we define stochastic schemes for generating latent cover assignments, that we call cover assignment schemes. Definition 3.1. A cover assignment scheme is a double indexed sequence of random variables A = (A i,j ) 1≤i≤n 1≤j≤r such that each A i,j is a Bernoulli random variable conditionally to X n . Let p i,j (X n ) be the parameter of the Bernoulli distribution of (A i,j |X n ), which is thus a function of the point cloud X n .

Note that, in Definition 3.1, the Bernoulli variables A i,j are not assumed to be independent nor identically distributed. Moreover, p i,j (X n ) can depend only on its associated point x i , or on the whole point cloud X n . Definition 3.2. Let A be a cover assignment scheme. The Soft Mapper of A is defined as the associated distribution of Mapper complexes, which corresponds to the push forward measure of the distribution of A by the map MapComp.

Examples of cover assignment schemes

We now give example strategies to define cover assignment schemes, beginning with the one that corresponds to the standard Mapper construction defined in Section 2.

Standard cover assignment scheme

Let f : X n → R be a filter function and let (I j ) 1≤j≤r be a finite cover of the image f (X n ) of f . The standard Mapper graph is then defined as MapComp(e * ), where for every 1 ≤ i ≤ n and 1 ≤ j ≤ r: e * i,j = 1 if f (x i ) ∈ I j . The cover assignment scheme A * , in this case, is such that every entry A * i,j follows a Dirac distribution on 1 if f (x i ) ∈ I j , and a Dirac distribution on 0 otherwise. In other words, the parameters of the Bernoulli distributions satisfy p i,j (X n ) = p i,j (x i ) = 1 if f (x i ) ∈ I j , and 0 otherwise, that is

P(A * = e|X n ) = 1 if e = e * , 0 otherwise.
In this degenerated situation, the random variables A * i,j are all independent conditionally to X n , and A * i,j conditionally to X n is equal to A * i,j conditionally to x i . Remark 4.1. An alternative and relevant approach for the standard Mapper graph is to define the intervals I j via the quantiles of the distribution of f (X n ). In this case, the random variables A * i,j do not only depend on x i , but also on the whole point cloud X n .

Smooth relaxation of the standard cover assignment scheme

Given some δ > 0, we can now define a cover assignment scheme A δ that approximates the cover assignment scheme A * arising from the standard Mapper graph, but that also enjoys useful smoothness properties in the optimization setting that we will consider in the next section. Specifically, using the same notations as before, and denoting each element of the cover with I j = [a j , b j ], consider, for each j ∈ {1, ..., r}, the function q j : X -→ [0, 1] defined with:

x →          1, if f (x) ∈ [a j , b j ] exp(1 -1/(1 -( ai-f (x) δ ) 2 )), if f (x) ∈ [a j -δ, a j ] exp(1 -1/(1 -( f (x)-bi δ ) 2 )), if f (x) ∈ [b j , b j + δ] 0, otherwise Now, define A δ = (A δ,i,j ) 1≤i≤n 1≤j≤r
to be the random variable in {0, 1} n×r such that for every (i, j) ∈ {1, ..., n} × {1, ..., r}: A δ,i,j | X n ∼ B(q j (x i )), with the A δ,i,j 's being jointly independent conditionally to X n . As for the standard cover, the Bernoulli parameter p i,j = q j (x i ) depends on its associated point x i and also on the chosen filter f . Moreover, notice that for every x i ∈ X n and j ∈ {1, ..., r}:

q j (x i ) ---→ δ→0 1, if f (x i ) ∈ I j 0, otherwise,
and this shows that A δ L ---→ δ→0 A * . Note that even though we can approximate the standard Mapper graph in this way, we do not always want to do so. For example, there could be cases where δ needs to be large enough so as to account for some uncertainty on the bounds of the cover (I j ) 1≤j≤r . Remark 4.2. Note that the same relaxed construction can be made for a multi-dimensional Mapper, i.e., for filter functions taking values in R d [START_REF] Carrière | Statistical analysis of mapper for stochastic and multivariate filters[END_REF], by making slight adjustments to the definition of q j using the Euclidean norm.

An additional example of a possible cover assignment scheme, which does not imply the existence of a filter function, is given in Appendix A.

Topological risk of Soft Mappers

We now switch to the problem of designing filter functions automatically for Mapper graphs using Soft Mapper. To answer this ill-posed problem, we propose to look for filter functions that are optimal with respect to some topological criteria associated to their (Soft)Mapper graphs. In particular, we focus on topological losses based on persistent homology.

Topological signature for Mapper graphs

Persistent homology. Persistent homology is a powerful tool that allows to encode the topological information contained in a nested family of simplicial complexes, also called a filtered simplicial complex, see for instance [START_REF] Edelsbrunner | Computational topology: an introduction[END_REF] for a general introduction. It traces the evolution of the homology groups of the nested complexes across different scales, producing topological descriptors that are, in particular, useful in machine learning pipelines [START_REF] Chazal | An introduction to topological data analysis: fundamental and practical aspects for data scientists[END_REF]. In the context of Mapper graphs, a variation of persistent homology called extended persistent homology has been proved useful, as applying it on Mapper graphs produces descriptors called extended persistence diagrams. These diagrams only require to define a filtration function on the graph, and are made of points in the Euclidean plane, each point encoding the presence and size (w.r.t. the filtration function) of a particular topological structure of the Mapper graph (such as a connected component, a branch or a loop). See Section 2 of [START_REF] Mathieu Carrière | Perslay: A neural network layer for persistence diagrams and new graph topological signatures[END_REF] for a brief introduction to extended persistence and [START_REF] Cohen-Steiner | Extending persistence using poincaré and lefschetz duality[END_REF] for a detailed presentation.

We now define a filtration function on Mapper graphs in order to compute extended persistence diagrams. Let F(X n , R) be the space of real valued functions defined on the point cloud X n . For a function F ∈ F(X n , R), we first associate a filtration ϕ to some K ∈ im(MapComp) with:

∀σ ∈ K : ϕ(σ) = max c∈σ x∈c F (x) card(c) ,
that is, node filtration values are defined as the average filter values of the data points associated to the node, and edge filtration values are computed as the maximum of their node values. Then, we compute the extended persistence diagram (which we consider as a subset of R 2 ) of the filtered simplicial complex (K, ϕ). We denote by MapPers the function that takes a Mapper graph and a scalar function on X n , and then outputs the persistence diagram:

MapPers : K × F(X n , R) -→ P(R 2 ).
Persistence specific loss. Now, we introduce a generic notation for a loss function-or, more simply, a statistic-that associates a real value to any extended persistence diagram. Denoting P D as the set of subsets of R 2 consisting of a finite number of points outside the diagonal ∆ = {(x, x) : x ∈ R}, such a function can be written as ℓ : P D -→ R.

Statistical risk of the topological signature associated to Soft Mapper

We finally compute the loss associated to a Mapper graph with the function

L : {0, 1} n×r × F(X n , R) -→ R (e, F ) -→ ℓ (MapPers (MapComp(e), F )) .
Then, we define the risk of a Soft Mapper MapComp(A) by integrating the loss according to the distribution of the Soft Mapper, or equivalently according to the distribution of the cover assignment scheme:

E (L(A, F )|X n ) = e∈{0,1} n×r L(e, F ) • P(A = e|X n ).
Here, both the distribution of A and the risk are conditional to X n . Note that the risk could also be integrated with respect to the distribution of X n . However, in this article, we only consider the non-integrated version of the risk.

Conditional risk optimization with respect to parameters

Now that we have properly defined risks associated to Soft Mapper distributions, we study in this section the convergence properties of filter optimization schemes minimizing such risks.

Problem setting

Let us introduce a parameterized family of functions {f θ :

X n → R, θ ∈ R s }.
In order to simplify notations, we assume in the following of the article that the function F used to compute persistence diagrams and the filter function f θ used to design cover assignments are the same, F = f θ . Let A be a cover assignment scheme whose joint distribution P θ depends on the filter function f θ ; that is the Bernoulli parameters p i,j may depend on the filter function values and the parameters θ. Note that this dependency is not only true for marginals of the distribution of the cover assignment scheme, but also eventually for its dependency structure.

Our goal is to find the optimal set of parameters θ that minimizes the topological risk associated to MapComp(A), when f θ is used to define the filtration values on the Mapper graphs. In other words, if we denote:

L : R s -→ R θ -→ E θ (L(A, f θ )|X n ), (1)
our aim is to find a minimizer of L. Note that in the definition of L, the expectation depends on θ because the distribution of A also depends on it.

In order to prove guarantees about minimizing L, we follow [START_REF] Carriere | Optimizing persistent homology based functions[END_REF], which uses the theoretical background introduced in [START_REF] Davis | Stochastic subgradient method converges on tame functions[END_REF], in which the authors prove that stochastic gradient descent algorithms converge under certain conditions. To use this framework, it suffices to prove two points (see Corollary 5.9. in [START_REF] Davis | Stochastic subgradient method converges on tame functions[END_REF] and Appendix B):

• L is definable in an o-minimal structure,

• L is locally Lipschitz.

Remark 6.1. When the cover assignment scheme is defined as the standard cover assignment scheme corresponding to the standard Mapper graph (see Section 4.1), this problem amounts to finding an optimal f θ that can be used to compute Mapper graphs. We will see however that convergence of the optimization problem in this case is without guarantees, which constitutes the main motivation for defining our smooth relaxation Soft Mapper (see Section 4.2).

6.2 Theoretical guarantees on the convergence of a gradient descent scheme

Under regularity assumptions on the parameterized family of filter functions F = {f θ : X n -→ R, θ ∈ R s }, we now show that the risk L in Equation ( 1) is definable and smooth. Theorem 6.2. Suppose that there exists an o-minimal structure S such that:

• for every x ∈ X n , the function θ → f θ (x) is definable in S and is locally Lipschitz,

• for every m ∈ N, the restriction of ℓ to the set of (extended) persistence diagrams of size m is definable in S and is locally Lipschitz,

• for every e ∈ {0, 1} n×r , the function θ → P θ (A = e|X n ) is definable in S and is locally Lipschitz.

Then L is definable in S and is locally Lipschitz. Remark 6.3. Our proof of Theorem 6.2 is given in Appendix C in the case where regular persistent homology is used, but it can be extended in a straightforward way to extended persistence diagrams, as extended persistent homology on a simplicial complex K can be equivalently seen as regular persistent homology on the cone on K (see chapter VII.3 in [START_REF] Edelsbrunner | Computational topology: an introduction[END_REF]). Moreover, defining the filtration on the coned complex also extends naturally by using affine transformations.

Under the assumptions of Theorem 6.2, it is then possible to give guarantees on the convergence of a stochastic gradient descent scheme to some critical points of L. This only requires additional, but mild and not very restrictive technical conditions regarding the stochastic gradient descent algorithm itself (see Appendix D).

Discussing the assumptions of Theorem 6.2

In this section, we discuss the assumptions of Theorem 6.2, and provide usual cases in which they are satisfied.

Assumption 1. The first assumption concerns the smoothness of the parameterized family of functions {f θ : X n -→ R, θ ∈ R s } and its regularity with respect to the set of parameters θ. As mentioned before, following the result of [START_REF] Wilkie | Model completeness results for expansions of the ordered field of real numbers by restricted pfaffian functions and the exponential function[END_REF], semi-algebraic functions (for example polynomial, rational, minimum and maximum functions), the exponential function and functions defined as compositions and usual operations between them are all definable in a same o-minimal structure. Furthermore, choosing continuously differentiable functions is sufficient to also have the local Lipschitz property.

As such, the family of linear functions {f θ : x → ⟨x, θ⟩, θ ∈ R s } satisfies the assumption, as well as the family of parameterized fully-connected neural networks since they are defined by composition between matrix products (which are polynomial) and activation functions involving exponential, maximum and hyperbolic functions.

Assumption 2. The second assumption concerns the persistence-based loss ℓ, that is used to compute the topological risk. In [START_REF] Carriere | Optimizing persistent homology based functions[END_REF], the authors list a number of possible functions for ℓ that satisfy our second assumption. For example, ℓ can be the total persistence, which quantifies the information given by a persistence diagram, defined as:

{(u i , v i )} 1≤i≤n -→ n i=1 |u i -v i |.
It can also be computed from persistence landscapes [START_REF] Bubenik | Statistical topological data analysis using persistence landscapes[END_REF] or from the bottleneck distance to a target persistence diagram [START_REF] Carriere | Optimizing persistent homology based functions[END_REF].

Assumption 3. Finally, the third assumption concerns the cover assignment scheme A. More specifically, it requires the regularity and smoothness of the success probabilities that give the distribution of A.

Interestingly, this assumption does not hold for the standard cover assignment scheme. For example, consider the elementary example where X n ⊂ R and A is the standard cover assignment scheme, which is degenerate at e θ , and which corresponds to the linear filter function f θ : x → ⟨x, θ⟩ and a cover (I j ) of its image. Fix a non-zero positive point

x ∈ X n (a similar argument can be made if it is negative) and a left hand bound a j of one of the intervals. Denoting θ 0 = aj x , we have that θ → P θ (A = e θ0 |X n ) is discontinuous at θ 0 , since ∀ϵ > 0 : ⟨x, θ 0 -ϵ⟩ = x • (θ 0 -ϵ) < a j , and therefore, P θ0-ϵ (A = e θ0 |X n ) = 0. This constitutes the main motivation for introducing our smooth cover assignment scheme because the functions θ → P θ (A = e|X n ) are in this case products of the functions q j , which are smooth with respect to the parameters (if our first assumption holds).

(α i ) i , Random noise sequence (ξ i ) i , Number of epochs N . for 0 ≤ i ≤ N -1 do for 1 ≤ m ≤ M do e ← sample from P θi y i,m ← an element of the sub-differential in θ i of L e : θ → L(e, f θ ) end for y i ← 1 M M m=1 y i,m θ i+1 ← θ i -α i (y i + ξ i ) end for return θ N
Computing the conditional risk L(θ), for a fixed θ ∈ R s , can be costly in practice since it requires computing the loss L(e, f θ ) for every possible cover assignment e ∈ {0, 1} n×r . As such, we estimate L(θ) with Monte Carlo methods. Note that this is possible here because the distribution P θ of the cover assignment scheme is indeed explicitly defined and known at each step of the gradient descent. If M is a non-zero integer and (e (m) ) 1≤m≤M is a sequence of independent realizations of the cover assignment scheme A, then the Monte Carlo approximation of the conditional risk is:

L(θ) = 1 M M m=1
L(e (m) , f θ ).

The law of large numbers gives:

L(θ) a.s ----→ M →∞ L(θ).
Moreover, the coordinates of A follow a Bernoulli conditional distribution, making repeated random sampling straightforward, at least when the marginal distributions of P θ are assumed to be independent.

For a fixed point cloud X n , a chosen family of parameterized conditional probabilities θ → P θ (•|X n ) and a family of parameterized filters θ → f θ , our corresponding optimization algorithm is detailed in Algorithm 1.

Numerical Experiments

In this section, we illustrate the efficiency of optimizing filter functions with Soft Mapper. In particular, we show that Mapper graphs computed from an optimized filter function (computed with gradient descent on Soft Mapper) are generally much better structured than Mapper graphs obtained from arbitrary filters (as is usually done in the Mapper applications). We present applications on 3D shape data in Section 7.1 and on single-cell RNA sequencing data in Section 7.2. Our code is available in the following Github repository [START_REF] Oulhaj | Mapper filter optimization[END_REF].

Mapper optimization on 3D shapes

A first application where we can use the Soft Mapper optimization setting is finding linear filters in order to skeletonize 3-dimensional shapes with Mapper graphs. Here, our dataset X n consists each time of a point cloud embedded in R 3 .

The different point clouds we study are displayed (as meshes) in Figure 1. The parametric family of functions is linear, i.e., equal to {f θ : x → ⟨x, θ⟩, θ ∈ R 3 }, and the cover assignment scheme A δ is the smooth relaxation of the standard case, with δ = 10 -2 • (max x∈Xn f θ (x) -min x∈Xn f θ (x)). The cover of the image space is given by r intervals of the same length, such that consecutive intervals have a percentage g of their length in common. The clustering algorithm for the three shapes is KMeans. The values of r (also called resolution), g (also called gain) and the number of clusters in the KMeans algorithm, for each 3-dimensional shape, are summarized in Table 2 of Appendix E.

Objective. Intuitively, the optimal directions to filter the 3-dimensional shapes (in a topological sense) are:

• for the human: the vertical direction,

• for the octopus: the parallel direction to its tentacles,

• for the table: the perpendicular direction to its upper surface, as these directions induce Mapper graphs with more topological structures. We will therefore measure the quality of our results by comparing our optimized directions θ to the ones cited above. To find θ, we use the total (regular) persistence as a persistence specific loss ℓ and we run Algorithm 1 with N = 200 and M = 10, each time taking the diagonal as the initial direction, i.e.

θ 0 = ( 1 √ 3 , 1 √ 3 , 1 √
3 ) T . The learning curves for each 3-dimensional shape are displayed in Figure 2, and the correlations between the optimized directions and those we identified as intuitively optimal are summarized in Table 1. As one can see from the table, we are able to recover these intuitive directions with gradient descent.

Qualitative assessment. One can see, in Figures 3 and4, that the regular Mapper graphs built with the initial and final (optimized) filter functions show clear improvement in the ability of the graphs to act as skeletons of the original point clouds. As such, we see that optimizing the Soft Mapper corresponding to the smooth relaxation of the standard cover assignment scheme succeeds in identifying optimal filter functions. The third shape, representing a table, is particularly interesting. Indeed, the optimal direction that we captured is different from the first and the second principal components computed by PCA, since the principal plane of the point cloud is given by the surface of the table. Hence, there is a contrast between the topological criteria that we use, which is the total persistence, and the maximum variance criteria used by PCA. Human Octopus Table 0.9999 -0.9984 0.9993 Table 1: Correlation between the optimized directions and the optimal ones, for each 3-dimensional shape.

Figure 3: Regular Mapper graphs computed with the initial filter function, corresponding, from left to right, to: the human, the octopus and the table. Vertices are colored using the mean value of the filter function in the corresponding clusters.

Figure 4: Regular Mapper graphs computed with the optimized filter function, corresponding, from left to right, to: the human, the octopus and the table. Vertices are colored using the mean value of the filter function in the corresponding clusters.

Mapper optimization on RNA-sequencing data

We now apply Mapper optimization on the human preimplantation dataset of [START_REF] Petropoulos | Single-cell rna-seq reveals lineage and x chromosome dynamics in human preimplantation embryos[END_REF], which can also be found in the tutorial of the scTDA Python library. The dataset consists of n = 1, 529 cells form 88 human preimplantation embryos, sampled at 5 different timepoints. The dataset can be accessed in the following link [26], and it contains the expression levels for p = 26, 270 genes for each individual cell. The information of the sampling timepoint for each cell is also given, but we do not include it during optimization. The dataset is first preprocessed using the Seurat package in R (gene counts for each cell are divided by the total counts for that cell and multiplied by 10 4 , and then they are natural-log transformed using log(1 + •)), which produces a normalized dataset X n ⊆ R p . The parametric family of filter functions we wish to optimize is also linear here, i.e. equal to {f θ : x → ⟨x, θ⟩, θ ∈ R p }, and the cover assignment scheme A δ is the smooth relaxation of the standard case with δ = 10 -5 • (max x∈Xn f θ (x) -min x∈Xn f θ (x)). The cover of the image space is given by 25 intervals of the same length, such that consecutive intervals have a percentage of 30% of their length in common. The clustering algorithm used is agglomerative clustering and its threshold is fixed using a Objective. To find θ, we use the total extended persistence as a persistence specific loss ℓ and we run Algorithm 1 with N = 200 and M = 10, taking the diagonal as the initial direction, i.e. θ 0 = ( 1 √ p , ..., 1 √ p ) T . The learning curve in displayed in Figure 8 of Appendix E. The regular Mapper graphs computed using the initial and the final filter functions are displayed in Figure 5, and are colored with respect to the time component (which was not included in the training dataset). Qualitative assessment. One can see that the data representation in the Mapper graph produced by the optimized filter function fits the time structure better than with the initial function. In order to confirm this, we isolate each subset of cells having the same sampling timepoint and we plot their respective estimated densities with respect to the initial and the optimized filter function values, in Figure 6. One can see that the optimized filter that we captured is capable of sorting the cells with respect to time, especially at the early timepoints. The reduced performance in this aspect for the later timepoints is, in our guess, due to slowing down of the cell differentiation process. Furthermore, the comparison, in Table 3 of Appendix E, between Pearson's correlation coefficients also show that the optimized filter is more correlated to time. We also verify that the branches in our optimized Mapper graph correspond to the same two genes, HTR3E for the early timepoints and CDX1 for the later ones, that were identified by [START_REF] Abbas H Rizvi | Single-cell topological rna-seq analysis reveals insights into cellular differentiation and development[END_REF], see Figure 7. We also identified a few nodes in the branch containing the cells which were sampled in the early stages, that do not contain a high expression level for the HTR3E gene. This could potentially point out another subpopulation of cells with distinct genomic profiles, and that our optimized Mapper graph has captured. An additional experiment using single cell RNA-sequencing data is given in Appendix F.

Discussion and future work

In this article, we have introduced Soft Mapper, a distributional and smoother version of the standard Mapper graph, with provable convergence guarantees using persistence-based losses and risks. Our case study in this article was finding an optimal filter function, among a parameterized family of functions, in order to construct regular Mapper graphs incorporating an optimized and maximal amount of topological information. We then produced examples of such optimization processes on real 3D shape and single-cell RNA sequencing data, for which we were able to obtain structured Mapper representations in an unsupervised way. These representations, especially for the single cell RNA-sequencing data, are not meant to represent novel or state of the art data representations in their respective research domains, but as a proof of concept of the practical benefit of our method. Moreover, our construction is not limited to the choice of a linear family of filter functions or to the filter optimization setting as a whole. Possible future work includes optimizing non-linear filter functions, based on neural networks or kernel methods, and studying Soft Mappers based on different cover assignment schemes, like the Gaussian cover assignment scheme defined in Appendix A.

3. Conditionally on the past, ξ k must have zero mean and have a second moment that is bounded by a function p : R s -→ R which is bounded on bounded sets.

Note that the last condition is satisfied by taking a sequence of independent and centered variables with bounded variance, which are also independent of the past iterates (x k ) k and (y k ) k .

According to [START_REF] Davis | Stochastic subgradient method converges on tame functions[END_REF], under these three conditions together with the condition that L is definable in an o-minimal structure and locally Lipschitz, then (L(x k )) k converges almost surely to a critical values and the limit points of (x k ) k are critical points of L.

E Additional Figures and Tables for the experiments

Parameter Human Octopus 3: Pearson's correlation between the initial filter and time, and the optimized filter and time for the human preimplantation dataset. The associated p-values, obtained from testing the null hypothesis that the true correlation coefficient is zero, are also presented.

F Mouse embryonic fibroblasts reprogramming dataset

We consider the mouse embryonic fibroblasts (MEF) reprogramming dataset of [START_REF] Schiebinger | Optimal-transport analysis of single-cell gene expression identifies developmental trajectories in reprogramming[END_REF]. It consists of p = 19, 089 gene expressions for 251, 203 MEF cells, densely sampled across 18 days, with 39 individual timepoints. The experiment involves adding Doxorubicine (Dox) to the cells on day 0, withdrawing it at day 8, and then transferring them to either a serum-free N2B27 2i medium or maintaining them in serum.

Objective. We would, therefore, want to produce a representation, using our Soft Mapper optimization, that accounts for the time component (like in Section 7.2) and for the divergence in the treatment that the cells received at day 8. In order to achieve this, we first take a uniformly sampled subsample of the dataset of size n = 1, 500 and we use the same preprocessing procedure as with the human preimplantation dataset. Similarly, we consider the same settings (linear family of filter functions, smooth cover assignment scheme, agglomerative clustering, diagonal initial parameter set and extended total persistence), and we run Algorithm 1 with N = 300 and M = 10. The learning curve is displayed in Figure 9. Qualitative assessment. By looking at the standard Mapper graphs corresponding to the initial and the optimized filter functions in Figure 10, one can see that the optimized Mapper graph represents the time component better and that it shows two major branches, which point to the two phases that appear in day 8 of the experiment. These observations are confirmed by the improvement in the Pearson's correlation coefficients with respect to time between the initial and the optimized filter function values in Table 4. We also color the optimized Mapper graph in Figure 11 using the three phases in the experiment (Dox, 2i and Serum), each mapped to a different color channel.

6. 4

 4 Computing the conditional risk in practice Algorithm 1 Soft Mapper Optimization Algorithm Require: Initial parameter set θ 0 , Number of Monte Carlo random samples M , Learning rate sequence

Figure 1 :

 1 Figure 1: Meshes of 3-dimensional point clouds representing from left to right: a human, an octopus and a table.

Figure 2 :

 2 Figure 2: Learning curves for the 3-dimensional shapes corresponding, from left to right, to: the human, the octopus and the table.

Figure 5 :

 5 Figure 5: Regular Mapper graphs for the human preimplantation dataset computed using: in the left the initial filter function and in the right the optimized filter function. Vertices are colored using the mean value of the sampling timepoint in the clusters.

Figure 6 :

 6 Figure 6: Estimated density of each subset of cells having the same sampling timepoint, with respect to: in the left the initial filter function values and in the right the optimized filter function values. Colors indicate the sampling timepoint in days.

Figure 7 :

 7 Figure 7: Regular Mapper graph computed using the optimized filter function, colored using the mean normalized expression of: in the left gene HTR3E and in the right gene CDX1.

Figure 8 :Filter

 8 Figure 8: Learning curve for the human preimplantation dataset.

Figure 9 :

 9 Figure 9: Learning curve for the MEF reprogramming dataset.

Figure 10 :Filter

 10 Figure 10: Classical Mapper graphs for the MEF reprogramming dataset computed using: in the left the initial filter function and in the right the optimized filter function. Vertices are colored using the mean value of the sampling timepoint in the corresponding clusters.

Figure 11 :

 11 Figure 11: Standard Mapper graph computed using the optimized filter function, colored by mapping each phase to a color channel: Dox in green, Serum in blue and 2i in red.

Table 2 :

 2 Resolution, gain and number of clusters parameters that are used to compute the Mapper for each 3-dimensional shape.

	Table

Acknowledgments

The research was supported by three grants from Agence Nationale de la Recherche: GeoDSIC ANR-22-CE40-0007, ANR JCJC TopModel ANR-23-CE23-0014 and AI4scMed, France 2030 ANR-22-PESN-000.

A Gaussian cover assignment scheme

In this section, it is assumed that X n is a point cloud in R p . Additionally, we consider r centers {c 1 , ..., c r } ⊆ R p and r symmetric, semi-definite and positive matrices {Σ 1 , ..., Σ r } ⊆ R p×p . For each j ∈ {1, ..., r}, consider the function:

q j : R p -→ [0, 1]

x -→ exp -(x -c j ) T Σ -1 j (x -c j ) . Define A = (A i,j ) 1≤i≤n 1≤j≤r to be a random variable in {0, 1} n×r such that for every (i, j) ∈ {1, ..., n} × {1, ..., r} : A i,j | X n ∼ B(q j (x i )), and as before we take the A i,j 's to be jointly conditionally independent. This cover assignment scheme is similar to Gaussian mixture models, in that its realizations can be seen as a "one-hot encoding" of the latent variables in a mixture model. However, we can see that a realization of A can have more than one non-zero entry per line as opposed to a mixture model. Furthermore, mean and variance parameters can be inferred with an EM algorithm, and estimated proportions can be also involved in the definition of the q j 's.

Note that this strategy of defining a cover assignment scheme does not use a filter function or an overlapping cover entirely.

B Elements of o-minimal geometry

Definition B.1. An o-minimal structure on the field of real numbers R is a collection (S n ) n∈N where each S n is a set of subsets of R n that satisfies:

1. All algebraic subsets of R n are in S n ; 2. S n is a Boolean subalgebra of the powerset of R n (i.e. stable by finite union, finite intersection and complementary);

4. if π : R n+1 → R n is the linear projection onto the first n coordinates and A ∈ S n+1 then π(A) ∈ S n ;

5. S 1 is exactly the family of finite unions of points and intervals.

The elementary example of an o-minimal structure is the collection of semi-algebraic sets. An element A ∈ S n for some n ∈ N is called a definable set. Furthermore, a map f :

Definable maps are stable under addition, product and composition. A function that is coordinate-wise definable is also definable. Moreover, the result of [START_REF] Wilkie | Model completeness results for expansions of the ordered field of real numbers by restricted pfaffian functions and the exponential function[END_REF] shows that there exists an o-minimal structure that contains the graph of the exponential function.

An important property of definable maps is that they admit a finite Whitney stratification. This means that if f : A → R m is definable with A ∈ S n , then A can be decomposed into a finite union of smooth manifolds such that the restriction of f to each of these manifolds is a smooth function.

For more details on o-minimal geometry, see [START_REF] Coste | Istituti editoriali e poligrafici internazionali[END_REF].

C Proof of Theorem 6.2

Lemma C.1. Let S be an o-minimal structure on R. Assume that the two following conditions are satisfied.

• For every x ∈ X n , the function θ ∈ R s → f θ (x) is definable in S and is locally Lipschitz.

• For every m ∈ N, the restriction of the persistence specific loss ℓ to the set of persistent diagrams of size m is definable in S and is locally Lipschitz.

Then for every e ∈ {0, 1} n×r , the function L e : θ ∈ R s → L(e, f θ ) is definable in S and is locally Lipschitz.

Proof. Let e ∈ {0, 1}

n×r . Let K = MapComp(e) with vertex set V . Remember that each vertex c ∈ V is actually a subset of X n . We now define three maps to decompose the function L e . First, let us introduce the function

For each coordinate of the function VertexFilt, that is for each c ∈ V , the function θ -→ [VertexFilt(θ)] c is a linear combination of the functions θ → f θ (x). We can therefore see that it is definable in S and locally Lipschitz, by our first assumption.

Then we introduce

SubFilt :

and finally Persistence : R |K| -→ R |K| that computes persistence for a filtration that acts on a fixed simplicial complex.

The two functions SubFilt and Persistence are taken from [START_REF] Carriere | Optimizing persistent homology based functions[END_REF], where they are both proven to be definable in every o-minimal structure and Lipschitz.

Notice that:

Since e, and thus K, are fixed, ℓ can be replaced by its restriction to persistence diagrams of size |K|. Hence, following our second assumption, L e is definable in S and locally Lipschitz.

Recall the assumptions in Theorem 6.2 :

Suppose that there exists an o-minimal structure S and we have that:

• for every x ∈ X n , the function θ → f θ (x) is definable in S and is locally Lipschitz.

• for every m ∈ N, the restriction of ℓ to the set of persistent diagrams of size m is definable in S and is locally Lipschitz.

• for every e ∈ {0, 1} n×r , the function θ → P θ (A = e|X n ) is definable in S and is locally Lipschitz.

By Lemma C.1 and following the first two assumptions, we know that for every e ∈ {0, 1} n×r , the function L e : θ → L(e, f θ ) is definable in S and is locally Lipschitz. Now, for every θ ∈ R s :

As such, L is a sum of products between functions that are definable in S and locally Lipschitz. We conclude that L is itself definable in S and locally Lipschitz.

Note that the local Lipschitz property is stable by product (as opposed to the global Lipschitz property). This is due to the fact that the product of two Lipschitz and bounded functions is Lipschitz, and the fact that we can always limit the neighborhoods of points in R s to bounded ones.

D Technical conditions for Stochastic Gradient Descent

We are in the setting where we use stochastic gradient descent to minimize a function L. If we write the iterates of the algorithm as:

x k+1 = x k -α k (y k + ξ k ), where


Dao Trinh

Simon Frappart

Guillaume Rückert

François Cortial

Sébastien Touzain

Orcid Dao

Effect of friction stir welding process on microstructural characteristics and corrosion properties of steels for naval applications

Introduction

Corrosion of structure is one of the main interests in shipbuilding. Weldings are well-known to be one of the weakest parts in terms of corrosion initiation due to a microstructural modification of steel and to a loss of the corrosion resistance. Friction Stir Welding (FSW) is a solid state welding process in which the rotary motion of a cylindrical tool along the welding line is the prime factor for the weld formation.

Since its creation in the 1990s by TWI (The Welding Institute), a comparative study of published research work on FSW of different materials demonstrates that most of the research work focus on aluminium (76%) [START_REF] Verma | A critical review of friction stir welding process[END_REF]. Therefore, the corrosion phenomena have been mainly investigated on aluminium alloys [START_REF] Elatharasan | Corrosion analysis of friction stir-welded AA 7075 aluminium alloy[END_REF][START_REF] Gharavi | Corrosion evaluation of friction stir welded lap joints of AA6061-T6 aluminum alloy[END_REF][START_REF] Nascimento | Corrosion behavior in AA5754 friction stir welded alloys[END_REF][START_REF] Patil | Corrosion behaviour of friction stir welded aluminium alloys AA6082-T6[END_REF][START_REF] Proton | Characterisation and understanding of the corrosion behaviour of the nugget in a 2050 aluminium alloy friction stir welding joint[END_REF][START_REF] Dhas | Corrosion study in friction stir welded plates of AA6061 and AA7075[END_REF][START_REF] Sidane | Local electrochemical study of friction stir welded aluminum alloy assembly[END_REF][START_REF] Field | Texture Effects on corrosion behavior of friction stir welded 7075 aluminum[END_REF][START_REF] Davoodi | Microstructure and corrosion characterization of the interfacial region in dissimilar friction stir welded AA5083 to AA7023[END_REF], a large part of the literature being published in the last five years. Only 15% of the publications deal with steels and those related to corrosion are unusual: works on stainless steels [START_REF] Clark | Thesis: An Analysis of Microstructure and Corrosion Resistance in Underwater Friction Stir Welded 304L Stainless Steel[END_REF], duplex stainless steels [START_REF] Magnani | Microstructural and electrochemical characterization of friction stir welded duplex stainless steels[END_REF], low carbon steels [START_REF] Sun | Suppression of hydrogen-induced damage in friction stir welded low carbon steel joints[END_REF] and high strength low alloy steels [START_REF] Konkol | Friction stir welding of HSLA-65 steel for shipbuilding[END_REF] can be cited as examples. Indeed, the FSW technique was developed for low melting point alloys such as aluminium alloys. Owing to the low melting point of aluminium and its alloys, the temperatures which are necessary to soften the metal during the FSW process are relatively low and do not necessitate elevated load. Nowadays, the real challenge is to extend this process to metallic alloys with higher melting point (above 1000°C) such as steels, titanium, or nickel alloys and to study the associated corrosion processes. If we have a look on corrosion studies, we can see that the corrosion of frictionstir processed cast NiAl bronze was tested by using the static immersion corrosion method [START_REF] Ni | Corrosion properties of friction-stir processed cast NiAl bronze[END_REF]. The corrosion of the friction stir welded magnesium alloy AM50 has been investigated by virtue of neutral salt spray tests and potentiodynamic polarisation measurements in conventional cells and in a mini cell [START_REF] Zeng | Corrosion of friction stir welded magnesium alloy AM50[END_REF].

Amongst the cited results on aluminium alloys, it has been observed that localised corrosion (mainly pitting in salt environment) is significantly minimised within the weld in comparison to the base metal and heat affected regions on both 5XXX [START_REF] Nascimento | Corrosion behavior in AA5754 friction stir welded alloys[END_REF] and 7XXX [START_REF] Field | Texture Effects on corrosion behavior of friction stir welded 7075 aluminum[END_REF] alloys. On 6XXX alloys, it has been demonstrated a greater corrosion resistance of the welded metal than the base alloy using electrochemical polarisation curves in 3.5% NaCl solution [START_REF] Patil | Corrosion behaviour of friction stir welded aluminium alloys AA6082-T6[END_REF]. In addition, electrochemical impedance spectroscopy (EIS) measurements on 7xxx alloy showed a decrease of the polarisation resistance in the base metal [START_REF] Elatharasan | Corrosion analysis of friction stir-welded AA 7075 aluminium alloy[END_REF]. All these results could be correlated to gradients in metallurgy as the precipitation state [START_REF] Proton | Characterisation and understanding of the corrosion behaviour of the nugget in a 2050 aluminium alloy friction stir welding joint[END_REF][START_REF] Field | Texture Effects on corrosion behavior of friction stir welded 7075 aluminum[END_REF], crystallographic texture and grain boundary structure [START_REF] Field | Texture Effects on corrosion behavior of friction stir welded 7075 aluminum[END_REF]. It has been shown that the corrosion behaviour of welds strongly depends on the size of the intermetallic phases in the stir zone and the presence of the copper-rich phases (in AA6005-T6) [START_REF] Esmaily | Corrosion behaviour of friction stir-welded AA6005-T6 using a bobbin tool[END_REF].

The FSW techniques applied to low carbon steel have shown that the stir zone has the highest resistance to hydrogen damage [START_REF] Toumpis | Friction stir welding of steel for marine applications[END_REF]. The relationship between the nobility of phases and the corrosion of the friction-stir Ni-Al has been examined by using the Kelvin probe [START_REF] Song | Studies of the nobility of phases using scanning Kelvin probe microscopy and its relationship to corrosion behaviour of Ni-Al bronze in chloride media[END_REF]. The anodic and cathodic reactivity in a dissimilar friction stir welded joint stainless steel orthopaedic implant (AISI 304 and 316L) was investigated by the microelectrodes [START_REF] Garcia | Pitting corrosion of welded joints of austenitic stainless steels studied by using an electrochemical minicell[END_REF]. The study showed that the HAZ was the most critical zone for pitting corrosion. Intergranular corrosion of welded joints of austenitic stainless steels was studied by using an electrochemical minicell [START_REF] Garcia | Intergranular corrosion of welded joints of austenitic stainless steels studied by using an electrochemical minicell[END_REF]. The relationship between microstructure, microhardness and corrosion sensitivity of an AA 2024-T3 friction stir welded joint has been studied by using local electrochemical open circuit potential measurements [START_REF] Bousquet | Relationship between microstructure, microhardness and corrosion sensitivity of an AA 2024-T3 friction stir welded joint[END_REF]: HAZ (Heat Affected Zone) close to the TMAZ (Thermo-Mechanically Affected Zone) was determined as the most sensitive zone to intergranular corrosion.

Concerning shipbuilding steels, studies are limited and focused on a current grade; examinations of FSW of HSLA-65 steel (considered by the U.S. Navy for ship structural applications, YS 0.2% = 450 MPa and UTS = 540 MPa) revealed no difference in corrosion rates between the weld and the surrounding zones (HAZ and BM) when submitted to a salt spray test according to ASTM B117 [START_REF] Konkol | Friction stir welding of HSLA-65 steel for shipbuilding[END_REF].

These works highlight that the enhanced corrosion behaviour is due to the changes of microstructure and probably to the galvanic coupling between the different zones formed during the FSW process. That is the reason why the electrochemical activity of stir welded alloys should be characterised using a local electrochemical technique. In the following section, we used two local electrochemical techniques: Scanning ElectroChemical Microscopy (SECM) and mini-cell technique on three FSW high yield strength (HYS) steel samples (DH36, S690QL and 80HLES). These materials are used for marine applications. The mini-cell technique provides the corrosion potential and Tafel plots of different zones on the steel sample while SECM measures the electrochemical relativities which could be used to correlate the microstructural characteristics. The purpose of this study is to evaluate the possible galvanic coupling between the different zones and to correlate the electrochemical activity with the metallurgical properties after welding.

Materials and methods

Sample and process properties

Three grades of steel (two HYS steels and one construction steel) used for current French naval applications have been assessed. The details about the three materials and the welding process are presented in the reference [START_REF] Rückert | Evaluation of FSW on high yield strength steels for shipbuilding[END_REF] but are briefly recalled. The butt welding tests (with full penetration) have been performed with a Gantry machine on 1500 × 150 × 8 mm plates on the three grades, joined together in the lengthwise (rolling direction). Friction stir-tool in PCBN (PolyCrystalline Boron Nitrides, developed and patented by MegaStir) based material comprises a threaded shoulder (25 mm in diameter) prolonged by an 8 mm long threaded conical pin. Process parameters were optimised such as the rotation speed of the tool but have to be considered for this paper as confidential for industrial reasons. Moreover, temperature of the rotating tool was measured during the second campaign and showed that the maximum temperature which is reached is lower than 700°C. As the other welding parameters have been developed especially for the French naval applications, they are confidential.

Tables 1 and2 give respectively the chemical composition and the guaranteed values for mechanical properties for each grade.

The microstructure of the bare material and the nugget parts of DH36, S690QL and 80HLES. Visual examinations Visual examinations were performed on cross sections of the welded steels identified by white patches in Figure 1(a) for the three samples. Samples were mechanically polished until a 3 μm diamond paste. Samples were then etched with a 2% Nital solution or a Béchet-Beaujard solution (for grain size determination mainly). The average grain size is determined by the comparison method according to the NF EN ISO 643 [START_REF]Steelsmicrographic determination of the apparent grain size[END_REF] and ASTM E112 [START_REF]Standard test methods for determining average grain size[END_REF].

Hardness tests

Vickers hardness measurements (HV5) were carried out according to NF EN ISO 9015-1 [START_REF]Destructive tests on welds in metallic materialshardness testingpart 1: hardness test on arc welded joints[END_REF] and associated standards cited by this standard. Hardness profiles were performed on cross sections at the upper and the lower surfaces, where electrochemical measurements were done. Two profiles are performed on two different samples of each steel welds to assess the reproducibility and the homogeneity of the weld.

SECM experiments

The original steel samples have 5 × 5 cm 2 dimension. The samples were cut into a smaller dimension 1 × 5 cm 2 and then were mechanically polished until a 4000 SiC grade. On the base of Figure 2, the dimension of each zones are estimated to be located from -1.0 to 1.0 cm for the Nugget Zone (NZ), near the bounder of the NZ around 1.0 and 1.2 position for the TMAZ, from 1.2 to 2.0 cm for the HAZ, beyond 2.0 cm for the BM.

The scanned sample is 1 × 5 cm² and the approach curves are recorded along the interface of the NZ at the dot positions as depicted by Figure 2(b). The counter electrode is a platinum grid and the reference electrode is a saturated silver chloride Ag/AgCl/Sat.KCl electrode.

The SECM Biologic M470 is used to map the electrochemical activities over different zones of the FSW steel samples. A 10 μm platinum microelectrode was used as a local sensor that was brought in the vicinity of the sample surface to probe the surface reactivity as shown in Figure 3(a). A redox species is added in the solution. When the tip is positioned very close to the sample, a 'positive feedback' behaviour occurs. The tip consumes the reductant to generate the oxidant while the substrate captures these oxidant species and regenerates the reductant into the solution. Hence, by measuring the tip current, the local electrochemical reactivity of different zones on the substrate can be mapped.

The microelectrode was placed above the sample about 200 μm in the z-direction and the approach curves were performed at several positions along the sample. The cartography mapping of the electrochemical activities with a microscopic scale by a horizontal scanning pattern of the surface can also be done. The FSW steel samples were immersed in a solution containing 10 mM ferrocyanide ion Fe(CN) 4- 6 (K 4 Fe(CN) 6 from Sigma-Aldrich) as a redox couple and 0.1 M sulphate sodium (Na 2 SO 4 from Sigma-Aldrich) in deionised water (ρ = 18.2 MΩ cm).

Mini-cell polarisation experiments

During the FSW process, the microstructures and the composition of the steel sampled have been modified. The NZ suffers a strong plastic deformation and complex mixing across the joint. The BM is less affected by the rotational tool. This variation in microstructures can lead to the possible galvanic coupling between different zones. In order to measure the corrosion potential of each zone, electrochemical polarisation curves were recorded using a mini-cell (3 mm diameter). A small surface of the steel sample is then exposed to the electrolyte solution, using a silicon joint between the mini-cell and the sample to ensure a waterproof contact. The electrolyte solution is NaCl 0.01M at room temperature (20 ± 3°C). The polarisation curves are obtained at several positions using the three electrodes classical electrochemical setup (Figure 4).

The working electrode is connected to the steel sample, a Saturated Calomel Electrode (SCE) is used as a reference and a platinum grid is used as the counter electrode.

Results

Visual examinations

Macroscopic cross section examinations are depicted in Figure 1. These observations on the three welded steels conclude to a defect-free nugget as no internal or geometric defects were noted in the observed areas. NZ, TMAZ/HAZ and BM can be distinguished although it is difficult to clearly separate the locations of the TMAZ and HAZ as they overlapped. The upper/lower surface weld width are, respectively, 23/6, 25/9 and 27/10 mm for DH36, S690QL and 80HLES. It is also demonstrated that the lower surface of the weld is more disturbed than the upper surface most probably owing to the competition between the metal viscosity and thermal gradients within the weld. The thermomechanical processes have real consequences on the microstructure as shown in Figure 5. DH36 presents a pearlite-ferrite microstructure in the BM, a ferritic microstructure with carbides in the upper weld and a recrystallised pearlite-ferrite microstructure in the lower weld. S690QL presents a bainitomartensitic microstructure in the BM and in the upper weld and a recrystallised pearlite-ferrite microstructure in the lower weld. 80HLES has a bainito-martensitic microstructure whereas the weld is entirely composed of martensite with several bainitic areas. The grain size of the base metal is about 9-10 according to the NF EN ISO 643 standard [START_REF]Steelsmicrographic determination of the apparent grain size[END_REF]. Generally, a grain refinement is obtained in the weld for DH36 and S690QL (grain size = 13) which is not visible for the 80HLES. Indeed, it appears that there is a coarser grain in the upper weld (grain size = 8) and a finer grain in the lower weld (grain size = 11). These observations confirm that the welding parameters and thermal conditions have an effect on the microstructure and the dynamic recrystallisation process and can affect the hardness properties as detailed subsequently.

Hardness measurements

Hardness measurement profiles are presented in Figure 6 and highlight that the hardness in the upper surface is quite reproducible across a weld whatever the alloy. However, in the lower surface, the profiles do not overlapped excepted for the 80HLES. This is probably due to microstructural heterogeneities. The NZ and BM zones are depicted according to the measurements on micrographs ( § 3.1).

The upper surface of the welded zone is harder than base metal for the three samples (DH36, S690QL, and 80HLES). These hardening process is obtained in the NZ and HAZ/ TMAZ related to the thermomechanical conditions imposed during FSW, even more pronounced when the steel is susceptible to quenching (as for 80HLES). Indeed, the microstructure modifications and, to a lesser extent, the grain size have a clear influence on hardness properties. The hardness values seem to be in accordance with the microstructural observations (Figure 5) where: pearliteferrite (175-200 HV) < bainite (250-275 HV) < bainite-martensite (∼300 HV) < martensite (350-400 HV). DH36 appears to be less affected than the two other steels as the NZ hardness is not different of the BM hardness (175-200 HV5). For S690QL, the hardness is slightly higher in the nugget core due to the presence of martensite within the bainitic microstructure. Compared to DH36 and 80HLES, a drop of hardness is observed in the TMAZ/HAZ. This decreasing of hardness compared to BM has been attributed to overaging [START_REF] Paillard | Microstructure, mechanical properties and microtexture of friction stir welded S690QL high yield steel[END_REF]. 80HLES has the higher increase of hardness (400 HV5) because it is susceptible to quenching and has a martensitic microstructure with some traces of bainite.

The properties of the lower weld are different since DH36 do not show hardness differences with the BM and S690QL has a drop of hardness in the weld. The latter has a recrystallised pearlite-ferrite microstructure in the welded zone (Figure 5) leading to a hardness value about 200 HV5. Once again, we observed a pure martensitic microstructure for 80HLES leading to hardness above 350 HV5. Nevertheless, these measurements give fairly scattered hardness values in the NZ, especially for S690QL and 80HLES. This is undoubtedly due to the presence of a complex and heterogeneous microstructure on the lower surface of the weld.

Mini-cell tests

The mini-cell technique is used only to prove the evidence of the galvanic coupling on the FSW steel. Figure 7 shows the polarisation curves when positioning the mini-cell on 2 areas (BM and NZ) of the 80HLES sample only (we will see in the following section that this alloy is the most reactive). Firstly, it can be seen that the polarisation curves are reproducible which allows the comparison between both tested zones. Secondly, the corrosion potential (Ecorr) of the BM is -0.64 V/SCE while the NZ has a more positive Ecorr around -0.61 V/SCE. A reproducible potential difference of 30 mV between the base material and the welded zone is then recorded. Even though the potential difference is small, a galvanic coupling could occur at the expense of the base metal as the weld zone presents the less cathodic potential than the base metal zone. This finding has already been reported in the literature for aluminium alloys and steels as described in the introduction. Jariyaboon et al.

[28] used the capillary microcell technique along the FSW 2024-T3/ 2024-T3 in a 0.1 M NaCl medium and made polarisation curves. They showed that the most negative zone is the most sensitive to intergranular corrosion. Bousquet et al. [START_REF] Bousquet | Relationship between microstructure, microhardness and corrosion sensitivity of an AA 2024-T3 friction stir welded joint[END_REF] measured the potential for free corrosion on different areas of the weld and analysed the amplitude of the fluctuations during the stabilisation of the average potential, along the joint of the weld 2024-T3/2024-T3. They related potential fluctuations to unstable pitting on large intermetallic. Consequently, this possible galvanic coupling can be related to the differences of microstructures, grain sizes and the correlated hardness values. Nevertheless, due to its resolution limits (the dimension of the mini-cell is not small enough), we cannot get the exact potential profile to compare with the hardness profile. Therefore, the SECM test can appear better to highlight the electrochemical behavior of the different zones. A stabilisation of the oxidation current is obtained above 0.5 V/Ag/AgCl/Sat.KCl. To be sure to produce Fe(CN) 3- 6 on the microelectrode according to Equation (1), the probe is polarised at 0.6 V/Ag/AgCl/Sat.KCl in each experiments corresponding to the limiting current (23.5 nA).

SECM tests

Fe(CN) 4- 6 Fe(CN) 3 - 6 + e -

The substrate was maintained at the open circuit potential (OCP). Generated Fe(CN) 3- 6 species are used to analyse the local reactivity of the welded surface. Indeed, the existence of a galvanic coupling generates an electrochemical cell imposing a potential for reducing Fe(CN) 3- 6 on the sample surface according to Equation (2):

Fe(CN) 3 - 6 + e - Fe(CN) 4- 6 (2)
As a consequence, a more cathodic region corresponds to a faster reduction kinetic as well as a higher current density. The reduction kinetic of Fe(CN) 3- 6 is locally evaluated by the approach curves where the current is measured when the probe is getting closer to the substrate.

The experimental approach curves for 80HLES are presented in Figure 8. The current is normalised with respect to the current measured when the probe is far enough from the sample. The approach curves are performed at several positions of the samples. As the welding is symmetric, position 0 means the centre of the NZ, position +22 mm is in the BM on the right, and the position -22 mm is in the BM on the left.

All curves are in positive-feedback which indicates an electrochemical activity of the substrate. Currents increase when the microelectrode is coming closer to the sample, which confirms the reduction of Fe(CN) 3- 6 onto the metallic substrate (Equation ( 2)). The greater the reduction kinetic is on the substrate, the greater is the normalised current, corresponding to a higher cathodic potential of this region. The cathodic current decreases as the microelectrode gets away from the NZ. In the BM (at 22 mm), the cathodic currents are lower than the currents in the NZ.

The electrochemistry profile relates to the highest normalised current when the tip approaches close to the sample surface, and the reduction kinetic k which depends also on the approach curves. The maximum normalised current (the current when the tip nearly touches the sample surface) can be plotted versus the distance from the centre of the nugget (x = 0 cm) which gives the evolution of the current in function of the distance on both sides of the weld, as presented in Figure 9(a) and Figure 10 for the upper and lower surfaces, respectively. For the upper surface (Figure 9(a)), two current profiles (solid line and dotted line) are presented to verify the reproducibility. In accordance with the hardness profile, the reproducibility of electrochemical profiles is acceptable.

In each case, the BM presents a less cathodic potential than the NZ, which means that the reduction kinetic is higher on the NZ than BM in accordance with the mini-cell test. Consequently, a galvanic coupling is possible and could be detrimental for regions alongside the weld, especially for the 80HLES sample where the current variations are the most noticeable. The two others substrates (DH36 and S690QL) have a more homogeneous current profile (DH36 sample having the lowest current). In those cases, it is unlikely that galvanic coupling occurs. Based on the current profiles, it can be also distinguish three zones with different electrochemical activities on each sample: the highest cathodic current on NZ (from -0.9 to 0.9 cm), high current on TMAZ and HAZ (between 1 to 1.5 cm), and lowest current on BM (from 1.5 to 2.1 cm). These local electrochemical activities of different zones are in good agreement with the hardness profiles presented in Figure 6.

Figure 10 presents the current profiles of three samples on the lower surface. The current profiles observed are in good agreement with the microstructure variation of the lower surface. The width of the NZ of lower surface is smaller (from -5 to 5 mm) than the NZ's dimension of upper surface (from -10 to 10 mm). In addition, the overall electrochemical reactivity on the lower surface is more homogenous and lower than the upper surface for DH36 and S690QL, which seems in accordance with the hardness profiles (Figure 6). The most affected sample remains the 80HLES where there is a clear difference in current between the NZ and the BM. Consequently, this sample should be susceptible to galvanic coupling.

Moreover, Figure 11 illustrates the three steel samples at three times of immersion in the SECM tested solution. An oxidation initiation is shown on 80HLES at about 0.5 mm from the nugget interface (black arrow on Figure 11(b,c) in accordance with the mini-cell and SECM tests. The two other steels are less susceptible to corrosion initiation even if some corrosion traces are observed on the DH36 sample after 120 min of immersion simultaneously on BM and HAZ (white arrows in Figure 11(c)).

Discussion

The presented results indicate that the NZ has the higher Ecorr than the BM zone. This is in accordance with the results from the literature that point out a better resistance of the NZ in comparison to the BM, whatever the material welded (aluminium or steel). This behavior is correlated to the different metallurgical states [START_REF] Proton | Characterisation and understanding of the corrosion behaviour of the nugget in a 2050 aluminium alloy friction stir welding joint[END_REF]. In our work, the polarisation curves and SECM profiles are likely to be related to the microstructure evolutions and hardness properties of the samples after the welding process [START_REF] Rückert | Evaluation of FSW on high yield strength steels for shipbuilding[END_REF] as the effect of the grain size is not clearly obvious in our study. Indeed, the corrosion resistance of the assembly seems to be linked to the homogeneity between BM and NZ. The correlation between the metallurgical state and the corrosion sensitivity are in good agreements with the previous study of Bousquet et al. [START_REF] Bousquet | Relationship between microstructure, microhardness and corrosion sensitivity of an AA 2024-T3 friction stir welded joint[END_REF]. As predicted, the SECM profiles are consistent with the visual aspect of the samples: the oxidation initiation at the NZ/HAZ interface on the 80HLES sample (Figure 11) proves that there is a galvanic coupling between the NZ and the other zones (mainly BM). Galvanic corrosion does not seem to affect DH36 and S690QL as no major corrosion initiation was noticed.

Finally, the results show that the HAZ and BM could be susceptible to localised corrosion. Yet in industrial application, two large sheets of metal are welded together. By extrapolation of our results to a bigger scale, the sheet and the weld are the anodic and the cathodic surfaces respectively. Considering the ratio between cathodic and anodic surfaces Sc/Sa, Sa is larger than Sc (up to 1/20). As a consequence of this, the assembly could not suffer from galvanic corrosion.

Conclusions

Local electrochemical investigations on three Friction Stir Welded (FSW) steels were performed in order to assess the galvanic coupling between the NZ, the HAZ or the BM. Electrochemical behaviours are discussed in relation with microstructural and hardness properties. The main results of this study are the following:

(1) the weld is the cathodic zone whatever the steel;

(2) SECM profiles are related to the hardness homogeneity after the welding process. The 80HLES steel exhibits the more significant differences in hardness and surface reactivity between the NZ and the other surfaces. These lead to a galvanic coupling inducing corrosion initiation. By comparison, DH36 and S690QL are more homogeneous in hardness and the absence of corrosion initiation was observed.

To conclude, FSW process is of high interest to limit the corrosion of the weld for three steels used in shipbuilding.

Figure 1 .

 1 Figure 1. Macrograph of the friction stirred welds (advancing side on left side). BM: Base Metal, TMAZ: Thermo-mechanical Affected Zone, HAZ: Heat-Affected Zone, NZ: Nugget Zone.

Figure 2 .

 2 Figure 2. (a) Schematic representation of the original sample of 5 × 5 cm 2 which is cut into a smaller dimension of 1 × 5 cm 2 and (b) the sample with the dot pos-itions where the approach curves (SECM) are recorded.

Figure 3 .

 3 Figure 3. (a) SECM setup to perform reactivity mapping at different positions along the x-axis of the FSW steel samples. The current of the microelectrode depends on the distance tip-substrate (z-axis) and the local reactivity of the sample (three different zones BM, NZ, BM). The positive feedback behaviour is observed; (b) cyclic voltammetry of the 10 µm tip when the tip is placed far away from the steel surface. The limiting current at 0.6 V/AgCl is 23.5 nA.

Figure 4 .

 4 Figure 4. Electrochemical mini-cell setup to perform the polarisation curves at different positions along the x-axis of the FSW steel samples. The working elec-trode is the small surface of the steel sample exposed to the electrolyte solution (NaCl). Reference electrode is a SCE. Counter electrode is a platinum grid.

Figure 5 .

 5 Figure 5. The microstructure of the base material and the nugget parts of DH36, S690QL and 80HLES (G = grain size, ND = not determined).

Figure 3 (

 3 Figure 3(b) shows the cyclic voltammogram obtained on the platinum probe between -0.2 and 0.6 V/Ag/AgCl/Sat.KCl at 50 mV s -1 . It exhibits the presence of Fe(CN) 4- 6 only.

Figure 6 .

 6 Figure 6. HV5 Hardness profiles and reproducibility in friction stirred welds for DH36, S690QL and 80HLES steels (DH36 and S690QL are at the same scale).

Figure 7 .

 7 Figure 7. Polarisation curves obtained when positioning the micro-cell on two zones of 80HLES sample: Base Metal (dotted line) and Nugget zone (solid line).

Figure 8 .

 8 Figure 8. Normalised approach curves along the interface of the nugget of 80HLES sample. The position is from -22 mm (left) to +22 mm (right).Note: The approach curves are shifted on the distance scale for a better visualisation.

Figure 9 .

 9 Figure 9. (a) Current profiles obtained from Figure 8 for three steel samples on upper surfaces and (b) macrograph of an as-received sample before polishing.

Figure 10 .

 10 Figure 10. Current profiles for the three steel samples on lower surfaces.

Table 1 .

 1 Chemical composition for DH36, S690QL and 80HLES steels.

	%max (wt)	C	Si	Mn	P	S	N	B	Cr	Cu	Mo	Nb	Ti	V	Ni	Zr
	DH36	0.18	0.50	1.60	0.035	0.035	--	-	-	---	-	-	-
	S690QL	0.18	0.50	1.60	0.020	0.010	0.015	0.005	0.8	0.50	0.70	0.062	0.05	0.10	2.0	0.15
	80HLES	0.15	0.25	0.50	0.01	0.01	--	0.5	0.25	0.40	--	0.09	4.8	-

Table 2 .

 2 Guaranteed values for mechanical properties for DH36, S690QL and 80HLES steels.

	Grade\mech.
	properties	YS 0.2% offset (MPa -ksi) UTS (MPa -ksi) El.%
	DH36	355-51.5	490-620/71-90	21
	S690QL	690-100	770-940/112-	14
			136
	80HLES	700-101.5	780-900/113-	14
			130

Acknowledgements

Disclosure statement

No potential conflict of interest was reported by the authors.


Eric Cassan

platform with transition metal dichalcogenide monolayers


Werner Verdier

Romain Le Tellier

Mathis Plapp

Alain Cartalade

Alain Cartalade Coupling

Coupling a grand potential ternary phase field model to the thermodynamic landscape of the Na_2O-SiO_2-MoO_3 nuclear glass

A nucleation and growth regime is known to occur in the processing of the ternary nuclear glass compound Na O-SiO -MoO , which separates into two liquid phases. Because this produces inhomogeneities in the glass, our goal is to predict the kinetics and topology of phase separation.

We present a methodology to couple CALPHAD data to a grand potential phase field model [1] for a ternary material. The phase field theory describes the dynamics of a fully resolved interface in a twophase material. It has a strong thermodynamic consistency and the inclusion of CALPHAD data allows for the quantitative description of a real material. Our phase field model is also coupled to the Navier-Stokes equations to take into account hydrodynamics effects.

The OpenCALPHAD software and a database of the Na O-SiO -MoO system [2] are used to construct simplified representations of free energy densities for a given tie-line of the glass. While this strategy (alternative to [3]) cannot reproduce spinodal decomposition, it yields a simple yet precise description of phase coexistence as relevant for the nucleation and growth regime.

Using Lattice Boltzmann simulations, we study the evolution of large populations of droplets and confirm that the Gibbs-Thomson condition contained in the phase field induces Ostwald ripening. [3] Vaishnvi Tiwari. "A consistent approach for coupling lumped-parameter and phase-field models for in-vessel corium to thermodynamic databases." PhD thesis. Université Paris Saclay, Nov. 2019.

  , R. Le Tellier , M. Plapp and A. Cartalade Université Paris-Saclay, CEA, Service de Thermo-hydraulique et de Mécanique des Fluides, 91191 Gif-sur-Yvette, France CEA-DES-IRESNE-DTN, CEA Cadarache, 13108 Saint Paul-lez-Durance, France Laboratoire de Physique de la Matière Condensée, CNRS, École Polytechnique, Institut Polytechnique de Paris, 91128 Palaiseau, France

Figure 1 :

 1 Figure 1: Snapshot pictures of a small part of the phase field at the start (left) and end (right) of a simulation of ripening with 6115 two-dimensional droplets. References [1] Mathis Plapp. "Unified derivation of phase-field models for alloy solidification from a grandpotential functional." In: Phys. Rev. E84 (3 Sept. 2011), p. 031601 [2] Sébastien Bordier. "Modélisation thermodynamique des phases insolubles dans les verres nucléaires : application à la vitrification du molybdène et des produits de fission platinoïdes." PhD thesis. Université Aix-Marseille, 2015.