Chengyi Dan

Yuchi Cui

Yi Wu

Zhe Chen
email: zhe.chen@sjtu.edu.cn

Hui Liu

Gang Ji

Yakai Xiao

Han Chen

Mingliang Wang

Jun Liu

Lei Wang

Yang Li

Ahmed Addad

Ying Zhou

Siming Ma

Qiwei Shi

Haowei Wang

Jian Lu
email: jianlu@cityu.edu.hk.

Achieving Ultrahigh Fatigue Resistance in AlSi10Mg Alloy by Additive Manufacturing

Since the first discovery of fatigue phenomenon in the late 1830s, the efforts to fight against fatigue failure have never been stopped by materials scientists and mechanical engineers. Here we report a fatigue immunisation phenomenon in nano-TiB2 decorated AlSi10Mg (NTD-Al) enabled by additive manufacturing. This fatigue immunisation mechanism benefits from the 3D dual-phase cellular nanostructure, which acts as a strong volumetric 3D dislocation nanocage to prevent the localised damage accumulation, thus inhibiting fatigue crack initiation. The intrinsic fatigue strength limit of NTD-Al was proven to be close to its tensile strength through in situ fatigue test of a defect-free micro-sample, where sign of neither crack initiation nor accumulated fatigue damages was observed. To demonstrate the practical applicability of this mechanism, the printed bulk NTD-Al achieved record high fatigue resistance tested by ASTM standard, which was more than double those of other additive manufacturing Al alloys and surpassed those of high-strength wrought Al alloys.

A paradigm of achieving high fatigue resistance through additive manufacturing phase engineering has been established from nanoscale structural design to the fabrication of geometrically intricate industrial components, which will be extended to the design and development of other fatigue-resistant metals.

Main Text:

Fatigue resistance is a critical design criterion of structural components, as it is estimated that over 80% of engineering failures are due to fatigue [START_REF] Suresh | Fatigue of Materials[END_REF] . Insufficient fatigue strength of metals has remained an unsolved problem for almost two centuries, where conventional metals exhibit fatigue strength generally lower than half of their tensile strength. In particular for Al alloys, which are the second widely used metals in industry, the typical fatigue strength ratio (fatigue strength limit/tensile strength) is only about 1/3 [START_REF] Zhang | Training high-strength aluminum alloys to withstand fatigue[END_REF] . This leads to a very important fact, but seldom mentioned in industry that for all the moving Al components suffering from cyclic loads, the load efficiency of materials utilisation is roughly estimated to be less than 20%, considering the safety factors and the inhomogeneous stress distribution in engineering components.

Despite the metallurgical defects introduced during manufacturing, the intrinsic mechanism for the lower fatigue resistance is the irreversible dislocation slips taking place in particular grains due to the severe heterogeneous strain distribution in polycrystalline metals, therefore enabling localised damage accumulation that initiates fatigue cracks. Recent efforts have shown that through microstructure design, fatigue resistance of metals can be dramatically enhanced, e.g. bone-like nano-laminated substructure arresting fatigue cracks in steel [START_REF] Koyama | Bone-like crack resistance in hierarchical metastable nanolaminate steels[END_REF] , fatigue-induced precipitation strengthening weak grain boundaries in Al alloy [START_REF] Zhang | Training high-strength aluminum alloys to withstand fatigue[END_REF] and highly oriented nanoscale twins constraining reversible cycling damages in copper [START_REF] Pan | History-independent cyclic response of nanotwinned metals[END_REF] .

Laser powder bed fusion (LPBF), as one of the most widely used metal additive manufacturing (AM) techniques, is known for its capability of directly fabricating geometrically complex components with free topology optimisation design. It is worth more attention that the rapid cooling rate of LPBF also provides unrivaled material microstructure designability down to nanoscale. Here we report a fatigue immunisation mechanism in AlSi10Mg alloy fabricated by LPBF AM. We demonstrate that continuous 3D dual-phase cellular nanostructure (3D-DPCN) of the LPBF AM AlSi10Mg alloy is immune to fatigue by inhibiting localised damage accumulation and fatigue crack initiation. This fatigue immunisation mechanism is distinct from the fatigue mechanisms of conventional metals that have been studied for over a century. Through an in situ micro-fatigue experiment, it is found that the intrinsic fatigue strength limit (> 10 7 cycles) of a defect-free sample is close to its tensile strength, and the post-fatigue sample is observed to be crack-free and absent of localised fatigue damage accumulation, where a fatigue ratio of ~ 0.9 is achieved. As a proof of the fatigue immunisation mechanism in bulk sample, we fabricated a record high fatigue-resistant nano-TiB2-decorated AlSi10Mg (NTD-Al) alloy through optimizing printing defects. The fatigue strength limit of the NTD-Al alloy, following ASTM standards, was the best among all Al alloys including the conventional high-strength wrought Al alloys with limited metallurgical defects, and more than double those of other reported AM Al alloys 2,5-22 (Fig. 1A andB). It is worth mentioning that the NTD-Al alloy has been applied to fabricate large thin-walled structures, including fan blades of aircraft engine designed by virtue of its high fatigue strength, and successfully passed the qualifying fatigue test (Fig. 1C). These findings not only provide a novel path to designing fatigue resistant alloys in metal research community, but also raise a new opportunity to weight reduction by increasing the materials load efficiency of moving components. Combined with the various advantages of 3D printing, such as topological optimisation (Fig. 1D), this work would have everlasting impacts on modern industry in terms of component weight reduction, and influence future society in terms of low-carbon emission from aircrafts and vehicles with the development and mass application of never-fatigue metals. We applied LPBF-AM to fabricate the samples using AlSi10Mg powders decorated with TiB2 nanoparticles [START_REF] Li | Selective laser melting of nano-TiB2 decorated AlSi10Mg alloy with high fracture strength and ductility[END_REF] , as demonstrated in Extended Data Fig. 1. Samples for standard fatigue tests were printed by ProX DMP 200 made by 3D Systems (Extended Data Fig. 2). The optimised powder chemical composition and printing parameters are given in Extended Data Table 1. Micro-computed tomography (μ-CT) analysis was used to investigate the printing defects in the NTD-Al, where uniformly distributed nearly spherical pores were found throughout the sample (Fig. 2A). The widely reported detrimental defects in common AM AlSi10Mg, the irregular shaped lack of fusions (LOFs, often in size of hundreds of micrometers, Extended Data Fig. 3A andB), resulted from the improper fusion between successive tracks or layers due to insufficient energy density [START_REF] Sanaei | Defects in additive manufactured metals and their effect on fatigue performance: A state-of-the-art review[END_REF] were absent in our NTD-Al sample. Electron backscatter diffraction (EBSD) showed a quasi-equiaxed grain morphology with an average size of approximately 2-3 µm (Fig. 2B). Further characterisation revealed a typical DPCN that consisted of a network of solidification cellular structure with an average diameter of ~ 500 nm and α-Al inside the cellular structure (Fig. 2C). Continuous 3D-DPCN were revealed by the tomographic reconstruction of backscattered electron (BSE) images from sections sliced by focused ion beam (FIB) (Fig. 2D). Close-up transmission electron microscopy (TEM) images showed that the cellular structure was composed of polycrystalline Si grains of several to tens of nanometers in size and random crystallographic orientations (Fig. 2E andF). The main component of the 3D-DPCN was Si phases containing a few TiB2 nanoparticles that could be observed in the energy dispersive spectroscopy (EDS) maps (Fig. 2F andG). EOS M280 was also used to print NTD-Al samples, showing no notable difference compared to ProX DMP 200 (Extended Data Fig. 3 and4), validating the applicability of our design strategy in different printing scenarios. Previous studies have demonstrated that the fatigue strength of conventional LPBF-AM AlSi10Mg is deteriorated by printing defects [START_REF] Ch | Study on the fatigue behaviour of selective laser melted AlSi10Mg alloy[END_REF][START_REF] Sanaei | Defects in additive manufactured metals and their effect on fatigue performance: A state-of-the-art review[END_REF][START_REF] Romano | Quality control of AlSi10Mg produced by SLM: Metallography versus CT scans for critical defect size assessment[END_REF] . The printing defects induce stress concentration and thus are the key contributors to the inferior and scattered fatigue properties of metal AM parts compared to their wrought counterparts [START_REF] Ch | Study on the fatigue behaviour of selective laser melted AlSi10Mg alloy[END_REF][START_REF] Sanaei | Defects in additive manufactured metals and their effect on fatigue performance: A state-of-the-art review[END_REF][START_REF] Romano | Quality control of AlSi10Mg produced by SLM: Metallography versus CT scans for critical defect size assessment[END_REF][START_REF] Haridas | Defect-based probabilistic fatigue life estimation model for an additively manufactured aluminum alloy[END_REF] . In order to rule out the complicated effects of printing defects and disclose the intrinsic fatigue strength limit related to the 3D-DPCN, in situ fatigue experiments were performed on micro-samples from pore-free areas. The 3D-DPCN, as a continuous integral network, is supposed to be the strongest obstacles to dislocation movements [START_REF] Zhang | Evolution of microscopic strains, stresses, and dislocation density during in-situ tensile loading of additively manufactured AlSi10Mg alloy[END_REF][START_REF] Wu | Microstructure and strength of selectively laser melted AlSi10Mg[END_REF] , compared to other structural characters such as element solutions, precipitations, grain boundaries et.al, and thus determines the intrinsic fatigue behaviour. The size of the micro-samples fabricated using FIB was chosen to be gauge length of ~ 14 μm and cross section of ~ 4 × 4 μm 2 , which contains around a thousand cellular nanostructures (Fig. 3A). Micro-tensile tests were first performed to find out the intrinsic mechanical response without the printing defects interference, where yield strength of ~ 470 MPa and ultimate tensile strength of ~ 550 MPa were measured (Extended data Fig. 5D, the in-situ movie available in Supplementary Video 1). The micro-tensile samples exhibited ductile behaviour with significant necking accompanied by gradual reduction of the cross-sectional area, as shown in Supplementary Video 1. The stress-strain curve was smooth without any strain burst or sudden load drop. It should be noticed that the dislocation slip bands [START_REF] Reichardt | In situ micro tensile testing of He+2 ion irradiated and implanted single crystal nickel film[END_REF] conventionally appeared during the in situ micro-test of metallic materials were not observed (Extended Data Fig. 5D), indicating that localised dislocation slips were suppressed. According to the tensile test results, two series of fatigue tests were conducted, one with maximum stress at the yielding stress, the other near the ultimate tensile stress, with sinusoidal cyclic loading tests at 100 Hz (Fig 3A ,inset) and stress ratio of R = 0.1. Surprisingly, neither sign of damage accumulation (such as the persistent slip bands, PSBs) nor crack initiation could be observed on the sample surface after 10 7 cycles loading at a maximum stress of 470 MPa (Fig. 3B, the in situ movie available in Supplementary Video 2). By contrast, when micro-sized Ni crystal was examined by a similar in situ fatigue test, slip band markings characteristic of PSB formation were observed [START_REF] Lavenstein | The heterogeneity of persistent slip band nucleation and evolution in metals at the micrometer scale[END_REF] . The transmission Kikuchi diffraction (TKD) and local misorientation map of thin-section sample prepared from the fatigued area in Fig. 3C-E demonstrated that very limited residual strain was generated, indicating strain localisation was totally restrained by the cell walls after long-term cyclic loading. These results suggest that the 3D-DPCN possesses an ultrahigh intrinsic fatigue strength limit above 470 MPa, which is more than doubled the highest fatigue strength limit of reported Al Alloys. The corresponding fatigue strength/tensile strength ratio is above 0.85, which has never been reported in any other metals to the best of our knowledge (Fig. 1B). When the maximum stress was raised to 520 MPa, detectable strain accumulation damage gradually developed in the form of necking during the course 10 5 loading cycles (after which the test was stopped), while the intactness of the sample was still preserved (Fig. 3F andG, and see Supplementary Video 3). This result further proves that strain damage accumulation only generates in a reluctant manner at stress close to the tensile strength, which deserves future investigation. A same test was also conducted on LPBF-AM AlSi10Mg without TiB2 decoration, where a fatigue strength limit ratio exceeding 0.85 was verified (Fig. S1 and see Supplementary Video 4), confirming that the intrinsic fatigue performance arises from the 3D-DPCN. These findings reveal a new route to the design of fatigue immunisation metals through additive manufacturing phase engineering. To validate the functioning of the fatigue immunisation mechanism in bulk NTD-Al, fatigue tests with ASTM/ISO standard specimens (Extended Data Fig. 2) were performed on the as-printed NTD-Al alloy. Despite the relatively low ductility of approximately 6%-8% (Extended Data Fig. 6) and the abundance of printing defects (Fig. 2A), the fatigue strength limits of the NTD-Al alloy reached 260 MPa (pull-pull fatigue testing, stress ratio R = 0.1; printed by ProX DMP 200) and 250 MPa (rotary bending fatigue testing, stress ratio R = -1; printed by M280), which were more than double those of reported AM AlSi10Mg and highstrength AM AlMgScZr alloys (Fig. 1A) [START_REF] Tang | Oxides, porosity and fatigue performance of AlSi10Mg parts produced by selective laser melting[END_REF][START_REF] Ch | Study on the fatigue behaviour of selective laser melted AlSi10Mg alloy[END_REF][START_REF] Brandl | Additive manufactured AlSi10Mg samples using Selective Laser Melting (SLM): Microstructure, high cycle fatigue, and fracture behavior[END_REF][START_REF] Aboulkhair | Improving the fatigue behaviour of a selectively laser melted aluminium alloy: Influence of heat treatment and surface quality[END_REF][START_REF] He | Fatigue and dynamic aging behavior of a high strength Al-5024 alloy fabricated by laser powder bed fusion additive manufacturing[END_REF][START_REF] Mower | Mechanical behavior of additive manufactured, powder-bed laser-fused materials[END_REF][START_REF] Mishra | Design approaches for printability-performance synergy in Al alloys for laser-powder bed additive manufacturing[END_REF][START_REF] Uzan | On the effect of shot-peening on fatigue resistance of AlSi10Mg specimens fabricated by additive manufacturing using selective laser melting (AM-SLM)[END_REF][17][18][START_REF] Uzan | Fatigue of AlSi10Mg specimens fabricated by additive manufacturing selective laser melting (AM-SLM)[END_REF][START_REF] Siddique | High and very high cycle fatigue failure mechanisms in selective laser melted aluminum alloys[END_REF][START_REF] Awd | Comparison of Microstructure and Mechanical Properties of Scalmalloy((R)) Produced by Selective Laser Melting and Laser Metal Deposition[END_REF][START_REF] Suryawanshi | Simultaneous enhancements of strength and toughness in an Al-12Si alloy synthesized using selective laser melting[END_REF] . The rotary bending fatigue strength limit of 250 MPa (R = -1) even exceeded those of conventional 2XXX, 6XXX and 7XXX series wrought Al alloys (Fig. 1B) 2,10-13 . These findings indicate the vast potential applicability of our alloy for the lightweight structures necessary in industries, where the fatigue property is the key design criterion. Furthermore, the intrinsic fatigue strength limit of defect-free samples almost doubled the macro-fatigue strength, denoting that there is plenty space for further enhancement of fatigue resistance as shown in Fig. 1B.

The fatigue testing results illustrate that the fatigue strength limit of the ASTM standard NTD-Al samples almost doubled those of traditional AM AlSi10Mg alloys but was still half lower than that of the defect-free micro-size NTD-Al sample. Previous literature has shown that the fatigue strength limit of macro-size 3D printing samples is strongly associated with the largest printing defects [START_REF] Sanaei | Defects in additive manufactured metals and their effect on fatigue performance: A state-of-the-art review[END_REF][START_REF] Wu | The effect of defect population on the anisotropic fatigue resistance of AlSi10Mg alloy fabricated by laser powder bed fusion[END_REF] . μ-CT results showed that obvious LOF defects with irregular morphology were distributed throughout the AM AlSi10Mg alloys (Extended Data Fig. 3), while nearly spherical pores instead of LOF defects were uniformly distributed throughout the NTD-Al samples (Fig. 2A). Meanwhile, the size of the largest defect in AM NTD-Al alloys was reduced to no more than one-third of that of the AM AlSi10Mg alloys (Extended Data Fig. 3). As the stress concentration from the defects is a crucial factor related to the fatigue resistance, the stress concentration factors of the largest defects drawn from the μ-CT results were estimated by the finite element method (FEM) in the AM NTD-Al and AM AlSi10Mg samples, respectively (Extended Data Fig. 7). The stress concentration factors of AM NTD-Al were generally between 2.2 and 3.0, while those of the irregular LOF defects in AM AlSi10Mg were 4.3 to 7.9. The greatly decreased pore sizes and the optimised porosity morphology are primarily responsible for the superior fatigue-resistance of AM NTD-Al compared with conventional AM AlSi10Mg.

We investigated the macro-specimens after 10 7 fatigue cycles at a maximum stress of 260 MPa (R = 0.1) to assess the microstructural features after high cycle fatigue test. The fatigued area of the sample (2 mm × 2 mm × 6 mm in the middle of the specimen) was first characterised by μ-CT (Fig. 4A). Compared with the initial sample (Fig. 2A), no detectable changes in the defect characteristics were found, including the size, morphology and distribution of pores.

Notably, no obvious cracks were observed in the characterised region after fatigue testing (Fig. 4A). However, as shown by the fracture surface of samples that failed at higher stress (Extended Data Fig. 8), the fatigue cracks usually initiate from the site of the largest defect near the surface of the sample, the size of which is in agreement with the μ-CT results.

Therefore, two of the largest pores (P1 and P2) near the sample surface and two of the largest pores in the middle of the sample (P3 and P4) were selected for high-resolution μ-CT scanning of 0.5 μm voxel size. No cracks emerged from these pores as shown in the insets of Fig. 4A, confirming that the crack initiation was entirely suppressed even around the largest pores. In order to reveal the fatigue immunisation mechanism of our macro samples, two TEM thin foils were lifted out from the fatigued areas using FIB to characterise the fatigued microstructure.

One was from a randomly chosen area and the other was from the stress concentration area next to P1, which was located and exposed by μ-CT-guided laser polishing (Fig. 4B, details of the process can be found in Supplementary Information Fig. S2). The latter was lifted out at the edge of P1 on the plane parallel to the loading axis (Fig. 4C). Fig. 4D to F and Extended Data Fig. 9 showed that the Si cellular structure was not destroyed after fatigue loading. Even through the material at the edge of P1 was exposed to much larger cyclic loading due to the stress concentration effect, no notable changes were observed in the Si cellular structure (Fig. 4D). Under the applied stress of 260 MPa (fatigue limit of macro-sized sample), stress concentration of over 500 MPa estimated by FEM (Extended Data Fig. 7D) would be developed around the spherical pores, indicating that the critical stress of fatigue immunisation without damage accumulation is around 500 MPa, in agreement with our micro-fatigue test results (sample passed fatigue test at maximum stress of 470 MPa and damage accumulation manifested at maximum stress of 520 MPa, Fig. 3B andG). The in situ fatigue test and the particular post-fatigue microstructure of the bulk sample prove a cyclic response totally immune to fatigue damage accumulation in our printed alloy.

Based on the above analysis, we rationalised that the defects optimisation and 3D-DPCN were responsible for the high fatigue resistance of the LPBF-AM NTD-Al alloy. The 3D-DPCN hampers the conventional strain localisation associated with irreversible damage during fatigue loadings (Fig. 4I), such as persistent slip bands, veins, and dislocation cells, which were widely observed in various coarse-grained metals [START_REF] Li | Unified factor controlling the dislocation evolution of fatigued face-centered cubic crystals[END_REF][START_REF] Pineau | Failure of metals II: Fatigue[END_REF] . Instead, individual dislocations were observed inside the Si nano-cellular structure (Fig. 4G andH). This coincides with the results observed in copper film that as the grain reduced to below 1 μm, the generation of dislocation substructures was inhibited and only individual dislocations were formed after fatigue test 34 .

Similar microstructural fatigue features have also been observed in other ultrafine-grain alloys [START_REF] Vinogradov | Multiscale Phenomena in Fatigue of Ultra-Fine Grain Materials-an Overview[END_REF] , where the limited space for dislocation movement inhibits the formation of fatigue dislocation patterns, resulting in increased resistance to crack initiation and high fatigue resistance. For instance, an ultrafine-grained high-entropy alloy has been found to exhibit a high fatigue ratio of approximately 0.62 times its ultimate tensile strength [START_REF] Liu | Extremely high fatigue resistance in an ultrafine grained high entropy alloy[END_REF] . Besides, A recent in situ TEM compression test on AM AlSi10Mg showed that during deformation, the dislocations generated were constrained inside the cells, where no obvious penetration through the cell boundaries was observed [START_REF] Wu | Microstructure and strength of selectively laser melted AlSi10Mg[END_REF] . These results provide microstructural evidence confirming that the 3D nano-cellular Si phase of approximately 500 nm in size acts as a strong volumetric 3D dislocation barrier nanocage that traps dislocation movement inside during fatigue load. By this manner, long-range dislocation slips and dislocation reorganisation were strongly inhibited during fatigue loading, thereby preventing the formation of strain localisation fatigue damage (Fig. 4J). Thus, a fatigue strength limit close to its tensile strength can be guaranteed without fatigue damage accumulation and crack initiation.

The 3D-DPCN shows a characteristic fatigue response with no shearing or damage accumulation below the critical stress, which has significant advantages in industry compared with conventional alloys where the unpredictability of fatigue damage accumulation raises great uncertainty. Based on our work a paradigm of achieving high fatigue resistance through additive manufacturing phase engineering has been established from nanoscale microstructural design to the fabrication of geometrically intricate industrial components. Utilizing in situ micro-scale tests, the intrinsic fatigue strength limits of the 3D-DPCN can be measured, the results of which could be incorporated with defects distribution from the CT analysis and stress distribution from the simulation of industrial components, so that the fatigue response of an AM component can be predicted to assist performance-oriented processing optimisation. One such example of meter-scale engine blade design is given in Fig. 1C andD.

In this work, we reported a defect-optimised bulk AM NTD-Al alloy that has a record high fatigue strength that greatly surpassed that of previously reported AM Al alloys and conventional high-strength wrought Al alloys obtained by different thermal-mechanical processes. A novel fatigue immunisation mechanism was revealed in Al-alloys prepared by LPBF-AM, where the inherent 3D-DPCN network resulted from the rapid solidification is able to confine fatigue damage via acting as a strong volumetric 3D dislocation barrier cage to prevent the localised irreversible damage accumulation during fatigue cyclic loading. Further enhancement of the fatigue resistance of NTD-Al is expected by decreasing the printing defect size to the sub-micron range or by eliminating defects through future technological innovations.

Our anti-fatigue paradigm has also been validated in industry scale components, including aircraft door hinges and engine blades. Furthermore, this fatigue damage immunisation mechanism enabled by additive manufacturing phase engineering approach could also be extended to the design of other fatigue-resistant dual/multi-phase alloy systems (another example is given in supplemental materials) and to other additive manufacturing techniques including electron beam melting and directed energy deposition.

Methods

Powder fabrication

The nano-TiB2-decorated AlSi10Mg powder was fabricated by an in situ salt-metal reaction method and gas atomisation [START_REF] Mower | Mechanical behavior of additive manufactured, powder-bed laser-fused materials[END_REF] . Extended Data Fig. 1 shows the spherical morphology of our in situ synthesised powders, which ensures a much better flowability. The flowability of our powders was measured to be ~ 20 s/50 g through Hall flowmeter measurement. It can be observed from the magnified image of the cross section of powder that the in situ synthesised TiB2 nanoparticles are homogeneously distributed in the powder (Extended Data Fig. 1B andC).

Previous works shows that TiB2 particles can ameliorate the laser printing process through (a) increasing the average laser energy density 14 ; (b) modifying the solidification path by promote grain nucleation and mitigate solidification defects [START_REF] Li | Selective laser melting of nano-TiB2 decorated AlSi10Mg alloy with high fracture strength and ductility[END_REF][START_REF] Prasad | Towards understanding grain nucleation under Additive Manufacturing solidification conditions[END_REF][START_REF] Fan | Grain refining mechanism in the Al/Al-Ti-B system[END_REF][START_REF] Stjohn | The Interdependence Theory: The relationship between grain formation and nucleant selection[END_REF] ; and (c) stabilizing melt pool fluctuations and preventing liquid droplet coalesce, which result in the elimination of large spatters and the reduction of printing defects [START_REF] Li | Selective laser melting of nano-TiB2 decorated AlSi10Mg alloy with high fracture strength and ductility[END_REF][START_REF] Qu | Controlling process instability for defect lean metal additive manufacturing[END_REF] . As shown in Extended Data Fig. 1E andF, the laser reflectivity of Al-Si-Mg alloy can be reduced by ~ 40% with 5% addition of TiB2, while the K-M absorption factor was raised by ~ 220%. With the addition of TiB2 particles, the detrimental LOF defects have been eliminated (Fig. 2A and Extended Data Fig. 3). The chemical composition is shown in Extended Data Table 1.

Laser powder bed fusion additive manufacturing

LPBF additive manufacturing of NTD-Al samples for standard fatigue test was performed using 3D Systems Prox DMP 200 and EOS M280 selective laser melting machines. The fan blades of aircraft engine were manufactured by a customised BLT-S500 selective laser melting machine. An inert, high-purity (≥99.99%) argon gas atmosphere flow with an oxygen content of < 600 ppm was used throughout the process to minimise oxidation. The AM processing was completed at room temperature without applying heat to the build plate. The printing parameters used in our work were listed in Extended Data Table 1. The samples consisted of 3 mm × 21 mm × 105 mm and 12 mm × 28 mm × 130 mm blocks for the fatigue tests; 5 mm × 5 mm blocks for microstructure characterisation; and 2 mm × 10 mm × 60 mm blocks for the tensile tests. Images of the as-printed samples are shown in Extended Data Fig. 2.

Sectioning and sample preparation

As-printed samples were removed from the build plates by wire electrical discharge machining.

The fatigue samples were polished using 400, 800, 1200 and 2500 grit sandpaper consecutively and then with 5 µm diamond suspensions, which ensured a deformation-free surface. The scanning electron microscopy (SEM) and EBSD samples were polished with 400, 800, 1200 and 2500 grit sandpaper. Final polishing of these samples was conducted with the diamond suspensions, followed by ion polishing in a Leica EM TIC 3X. Some of the polished samples were etched using Keller's etchant to reveal the 3D cellular Si structure (Fig. 2C).

The TEM and TKD lamellas were prepared in a Tescan Lyra3 FIB/SEM microscope. A protective platinum layer was deposited at 30 kV and a current of 200 pA. FIB trenches were roughly milled under 30 kV and 10 nA. Cross-sections were finely polished using a 3 nA current. After lifting out the sample and welding it to a Cu TEM grid, the lamellas were thinned under 30 kV, with the current reduced in the sequence of 1 nA, 500 pA, 150 pA and 50 pA.

Final polishing was conducted at 5 kV and a 50 pA current.

Microstructure and defect characterisation

The microstructures of the as-fabricated alloys were characterised with a SEM (Tescan Lyra3) equipped with EBSD (Oxford Nordlys Max3). The EBSD maps were recorded with step size of 0.1 μm. The orientation evolution of the fatigued samples was characterised using TKD with step size of 30 nm (Oxford Nordlys Max3). TEM (FEI Tecnai G2 operating at 200 kV) was used to examine the Si cellular structure.

Reconstruction of printing defects

X-ray μ-CT was performed using Xradia 510 Versa (Zeiss) to analyse the printing defects inside the SLM-printed samples. A voxel size of 3.0 µm was selected to allow the large specimen volumes (up to 2 mm × 2 mm × 6 mm) to be imaged. High-resolution μ-CT scanning (0.5 µm voxel size) was further performed on localised regions. Reconstruction of the scanned volumes was conducted using Dragonfly software. The defect population was resolved with respect to the position and volume.

Reconstruction of 3D dual-phase cellular nanostructure

To obtain 3D volumes of the studied materials, SEM was coupled with the FIB milling technique (Lyra3 Tescan). The angle between the FIB and SEM columns was 55°. Before running the acquisition, a Pt layer (10 ×10 ×1 μm) was deposited on an area of interest by ion beam deposition (IBD) to smooth out the surface roughness and protect the target surface. A micropillar (10 ×10 × 20 μm) was prepared for the 3D acquisition. After acquiring an BSE image at the side surface of the micropillar, a 15 nm step of material was removed using FIB.

Serial FIB sectioning was done with a current of 1 nA at 5 keV. The following BSE 2D image was acquired and this process was repeated several hundred times to obtain an 3D volume with a resolution of 15 nm. The collected 2D images of the elemental-Si contrast were reconstructed by Dragonfly software.

Tensile and Fatigue test

Dog-bone tensile testing specimens were machined according to the ASTM-E8M standard.

The tests were carried out on a Zwick/Roell Z100 testing machine at a constant strain rate of 10 -4 s -1 .

Fatigue testing specimens were machined according to the ASTM E466-21 standard for pull-pull fatigue test, R = 0.1 (Extended Data Fig. 2C) and the ISO 1143-2008 for rotating bending fatigue test, R = -1 (Extended Data Fig. 2D), respectively. High-frequency fatigue testing machines were used for the rotating bending fatigue test (R = -1) (Giga Quad YRB200; Yamamoto Corporation, Japan) and the pull-pull fatigue test (R = 0.1) (Changchun Qianbang Corporation, China). The cyclic loading followed a sinusoidal wave. A frequency of 80 Hz was used for both fatigue tests. The tests were conducted in air at room temperature (approximately 21 °C and 30% relative humidity). The high cycle fatigue tests were terminated after 10 7 cycles, with the surviving samples being identified as run-outs.

Micro-sample fabrication

For the in situ micro-tests, "T"-shaped micro-specimen geometry was fabricated as shown in Extended Data Fig. 5. The gauge regions were rectangular in cross-section with approximate dimensions of 4 × 4 µm 2 , while the gauge lengths were approximately 14 µm. The "T" head region was approximately 15 µm in width and the same thickness as the gauge section. During the test, the "T" head would be lifted from the underneath at two sides to induce tensile load at the gauge region. Chamfering was introduced at the two ends of the gauge region to reduce local stress concentration.

The micro-specimens were fabricated at the top edge of the printed sample after mechanical surface polishing, so that the top and front views of micro-specimen could be exposed to laser and ion milling. The first step of fabrication was rough-milling the geometry using a Gemini2 (Zeiss) femtosecond laser operated at 4.5 W with a repetition rate of 1.0 kHz.

After laser milling, FIB in Tescan Lyra3 SEM-FIB was used to obtained the final gauge geometry. Surface imperfections and curtaining, as well as tapering of the specimen, were minimised by performing a low-current final polishing step at 30 kV, 150 pA.

Micro-testing methodology

The micro-tensile and fatigue tests were performed utilizing an Alemnis Standard Assemble platform inside of a Tescan Lyra3 SEM. A customised diamond tensile grip was used to induce tensile load to the specimen (Extended Data Fig. 5A andB). During the FIB polishing of "T"shape geometry, several adjustments was made to ensure full contact between the "T"-head and the tensile grip at the two sides, so that the tensile load will be applied along the gauge axis.

For the tensile test, a nominal strain rate of 10 -3 s -1 was applied using the displacementcontrolled mode. For the fatigue test, the cyclic loading was introduced through applying sinusoidal displacement signal at 100 Hz. The stress level was controlled by adjusting the input displacement value and amplitude to perform the R=0.1 fatigue test. The load and displacement data were tracked and recorded at 1kHz frequency. The displacement signal was recalibrated after each 10 4 loading cycles (100 s) to minimise the effect of mechanical drifting. Damon, J., Dietrich, S., Vollert, F., Gibmeier, J. & Schulze, V. Process dependent porosity and the influence of shot peening on porosity morphology regarding selective laser melted AlSi10Mg parts.

Additive Manufacturing 20, 77-89, doi:10.1016/j.addma.2018.01.001 (2018).

Extended data for Achieving Ultrahigh Fatigue-Resistant Al Alloys by Additive Manufacturing

Chengyi Dan 1,2 †, Yuchi Cui 1 †, Yi Wu 2 †, Zhe Chen 1,2 †*, Hui Liu 3 , Gang Ji 4 , Yakai Xiao 2 , Han Chen 2 , Mingliang Wang 1 , Jun Liu 2 , Lei Wang 2 , Yang Li 2 , Ahmed Addad 4 , Ying Zhou 2 , Siming Ma 2 , Qiwei Shi 2 , Haowei Wang 1,2 , Jian Lu 3 * Correspondence to: zhe.chen@sjtu.edu.cn, jianlu@cityu.edu.hk.

Extended Data

Fig. 1

 1 Fig. 1 Achieving high fatigue strength of the AM NTD-Al alloy. (A) Number of cycles to failure plotted against the maximum stress of AM NTD-Al (stress ratio (R) = 0.1 and -1), compared with other reported AM AlSi10Mg and AlMgScZr alloys 5-9,14-22 . (B) Fatigue limit to tensile strength ratio vs. fatigue strength of AM NTD-Al, compared with Al alloys, R = -1 2,10- 13 . (C) Multi-scale specimen validations for unprecedented fatigue performances. (D) Multiscale optimisation strategies for performance improvement.

Fig. 2

 2 Fig. 2 Microstructure of the AM NTD-Al alloy. (A) μ-CT analysis showing the spatial and size distributions of printing defects, where the largest defect is measured to be 73 µm, only about 1/3 of the LOF defects in AM AlSi10Mg alloy without TiB2 decoration (Extended Data Fig. 3A and B). (B) Grain morphology of the printed sample. (C) A network of solidification cellular structure with an average diameter of ~ 500 nm. (D) Continuous 3D Si cellular structure revealed by BSE/FIB tomography. (E) Cellular structure consisting of nanosized Si phases revealed by TEM. (F-G) TEM image and Al, Si, Mg and Ti EDS maps illustrating that the distribution of Si coinciding with the cellular structure. Inset showing the selected area electron diffraction (SAED) pattern illustrating Si existing as nanosized phases with random orientations.

Fig. 3

 3 Fig. 3 In situ micro-fatigue testing results. SEM images of the micro-sample (A) before the fatigue test and (B) after 10 7 loading cycles at the maximum stress of 470 MPa. Inset: loading curve showing 50 cycles in 0.5s (part of the total loading curve as an example) of stress from ~ 50 MPa to ~ 470 MPa. (C) Band contrast image of the sample after the fatigue test, with (D) TKD map and (E) local misorientation map. (F) SEM images of the micro-sample before the fatigue test and (G) after 10 5 loading cycles at the maximum stress of 520 MPa. Inset: loading curve showing 50 cycles in 0.5s of stress from ~ 50 MPa to ~ 520 MPa.

Fig. 4

 4 Fig. 4 Fatigue mechanism investigation on the specimen after 10 7 fatigue cycles at a maximum stress of 260 MPa (R = 0.1). (A) No obvious cracks were observed in the specimen after fatigue testing; no cracks emerged from the largest pores (P1-P4); P1 and P2 were located close to the sample surface while P3 and P4 were in the middle of the sample. (B) μ-CT scanning cross-section of P1. (C) Locating and exposing the cross-section of P1 by μ-CTguided laser polishing. (D) TEM characterisation of intact Si cellular structure in the region next to P1 (TEM foil lifted out from the rectangular region in Fig. 4C). (E-F) EDS maps illustrating the distribution Al and Si elements. (G-H) Individual dislocations distributed inside one Si nano-cellular structure. Schematics showing (I) the conventional fatigue damage originating from PSB and (J) the fatigue immunisation mechanism of 3D-DPCN structure.

Fig. 1

 1 AlSi10Mg powders decorated with TiB2 nanoparticles. (A-B) TiB2/AlSi10Mg powders with spherical morphology. (C) Cross-section of powder showing the homogeneously distributed Si cells and TiB2 particles. (D) Statistic analysis of the sphericity of TiB2/AlSi10Mg powders. The laser reflectivity (E) and K-M absorption factor (F) of the AlSi10Mg and 5% TiB2/AlSi10Mg powders. The laser absorption rate of 5% TiB2/AlSi10Mg powders have been significantly increased by introducing nano-TiB2 particles. Extended Data Fig. 2 As-printed NTD-Al alloy fatigue testing specimens. (A) Samples constructed by machine EOS M280. (B) Samples constructed by machine 3D Systems ProX MP 200. Schematics of fatigue testing specimen dimensions. (C) Pull-pull fatigue test sample geometry in mm, R = 0.1 (ASTM E466-21). (D) Rotating bending fatigue test sample geometry in mm, R = -1 (ISO 1143-2008). Extended Data Fig. 3 μ-CT analysis showing the spatial and size distributions of defects. (A) Defects with irregular morphology in AM AlSi10Mg alloy. (B) The maximum defect in the AlSi10Mg sample with the length about 266 μm. (C) Defects with near spherical morphology in AM NTD-Al alloy manufactured by EOS M280. (D) The maximum defect in the NTD-Al sample with the diameter about 77 μm. (E-F) Comparison of number and volume fractions of defects in different size ranges. Extended Data Fig. 4 Microstructure characterisation of the NTD-Al sample manufactured by EOS M280. (A) Grain morphology of the plane perpendicular to the printing direction. (B) Grain morphology of the plane parallel to the printing direction. (C) Network of solidification cellular structure with an average diameter of ~ 500 nm. (D) Selectedarea electron diffraction pattern indicating that Si existed as nanosized phases with random orientations. Extended Data Fig. 5 In situ micro-mechanical testing. (A) Geometry of the tensile grip and micro-specimen. SEM images of (B) the customised diamond tensile grip and (C) the micro-specimen. (D) Stress-strain curve measured from the in situ micro-tensile test, inset: SEM images of the necked region at different strain levels. Extended Data Fig. 6 Tensile Properties of as-printed NTD-Al. Engineering stress-strain curves of as-printed NTD-Al alloys by the two additive manufacturing machines. Extended Data Fig. 7 FEM simulation of the stress concentration caused by the internal pores in the AMAlSi10Mg alloy and AM NTD-Al alloy. (A) An example of the FEM model with an irregular LOF defect inside the AM AlSi10Mg alloy matrix. (B) Stress distribution near the typical LOF defect surface in the AM AlSi10Mg alloy under a nominal strain of 0.05%. (C) Stress distribution of a typical spherical pore in the AM NTD-Al alloy under a nominal strain of 0.05%. (D) Stress distribution of the typical spherical pore under a nominal strain of 0.31% when the stress of the matrix is close to the fatigue strength (~ 260 MPa). € Stress concentration factors of nine large irregular LOF defects in the AM AlSi10Mg sample and nine typical pores in the AM NTD-Al sample. Extended Data Fig. 8 Fractographic observations of fatigue failures in AM NTD-Al alloy. (A-C) Fracture surface of AM NTD-Al alloy at different fatigue loading strength, R=0.1; (D-F) three typical regions pointed out by white arrows in Extended Fig. 8A. The fatigue crack usually initiates at the largest pore next to the sample surface. Many smaller defects were also found on the fracture surface. The interspacing between neighboring defects ranges from tens to hundreds of microns. Obvious Si cellular boundaries were also found on the fracture surface. Extended Data Fig. 9 Si cellular structure of the AM NTD-Al alloys after 10 7 fatigue testing cycles at a maximum stress of 260 MPa (R = 0.1). (A-B) HAADF STEM images showing the intact Si cellular structure. TEM samples were prepared from randomly selected area from the gauge section of the sample after fatigue testing. (C-F) EDS maps illustrating the distribution Al, Si, Mg and Ti elements.

Extended Data Table 1 Chemical composition (wt.%) and additive manufacturing processing parameters of NTD-Al and AlSi10Mg powders (The corresponding

  weight and volume fractions of the TiB2 nanoparticles were ~ 5 wt.% and ~ 3.4 vol.%, respectively)

	Element	Si	Mg	Cu	Mn	Ti	B	Al
	NTD-Al	9.8	0.32	<0.03	<0.01	3.84	1.76	Balance
	AlSi10Mg	10.1	0.32	<0.03	<0.01	/	/	Balance
			Laser	Laser	Scanning	Layer	Rotation	Hatching
	Parameter	power	diameter	speed	thickness	angle	space
			(W)	(μm)	(mm/s)	(μm)	(°)	(μm)
	AlSi10Mg	ProX DMP 200	280	75	1000	30	66.7°	100
	NTD-Al	ProX DMP 200	280	75	1200	30	66.7°	100
	NTD-Al	EOS M280	320	75	1000	30	66.7°	100

Acknowledgments: We acknowledge L.A. Jiao and X.J. Cao from Carl Zeiss (Shanghai) for their aid in micro-CT analysis and micro-CT-guided laser polishing experiment, as well as W.

Li from Tescan China for his support on FIB-SEM experiments.

Funding:

National Natural Science Foundation of China grant 51971137 (ZC) National Natural Science Foundation of China grant 52101043 (CD) National Natural Science Foundation of China grant 52101179 (JL) Conseil Regional du Nord-Pas de Calais (GJ) European Regional Development Fund (ERDF, GJ)

Data and materials availability: All data are available in the main text or the supplementary materials. The data generated during and/or analysed during the current study are available from the corresponding author. Correspondence and requests for materials should be addressed to Zhe Chen.


Victor Guyomard
email: victor.guyomard@orange.com

Françoise Fessant

Thomas Guyet

Tassadit Bouadi

Alexandre Termier

Interactive visualization of counterfactual explanations for tabular data

Keywords:

In this paper we present an interactive visualization tool that exhibits counterfactual explanations to explain model decisions. Each individual sample is assessed to identify the set of changes needed to flip the output of the model. These explanations aim to provide end-users with personalized actionable insights with which to understand automated decisions. An interactive method is also provided so that users can explore various solutions. The functionality of the tool is demonstrated by its application to a customer retention dataset. The tool is compatible with any counterfactual explanation generator and decision model for tabular data.

Motivation

A counterfactual explanation is a modified version of an example to be explained that answers the question: what would have to change to get a different prediction? These explanations are intended to provide users with personalised and actionable information that allows them to understand, and possibly challenge or improve, automated decisions [START_REF] Guidotti | Counterfactual explanations and how to find them: literature review and benchmarking[END_REF]. Beyond the generation of this counterfactual explanation, it is necessary that its presentation be understood so that the user knows how to exploit this information. There is still little work dedicated to the visualization of individual explanations of the counterfactual type. Gomez et al. [4] proposed ViCE, a tool that allows the generation of counterfactual explanations and visualise them as part of the credit granting classification. ViCE deals only with numerical variables. SDA-Vis [START_REF] Garcia-Zanabria | SDA-Vis: A visualization system for student dropout analysis based on counterfactual exploration[END_REF] is another example used in a context of helping analysis of school drop-out. Bove et al. [START_REF] Bove | Contextualization and exploration of local feature importance explanations to improve understanding and satisfaction of non-expert users[END_REF] were able to identify through a user study that the most interesting visual information for them were contextualisation, with a description of the variables that are used for prediction, and the interactivity of the visualisation tool which gives the user freedom to explore an explanation. Their study focused on individual explanations by feature importance, in a context of car insurance. We have built on this work to specify the functionalities of our tool in the context of counterfactual explanations.

Demonstrator

The tool we propose is intended for users who are not specialists in machine learning algorithms. It can be a business expert or an end user impacted by the decisions of a model. Through the tool, the user has access to explanations and can interact with the decision system. The main objective of the tool is to provide an intuitive visual representation of the counterfactual explanations provided by any algorithm. More precisely, our objective is to show, for a given instance, 1) which features must be modified for the model decision to change, 2) what the magnitude of the change must be and 3) to allow the exploration of alternative solutions. 5

Interface description

Figure 1 displays a counterfactual explanation for a binary classification problem of customer churn (more details in use case study section below).

Various information can be found on the upper part of the interface concerning the example and its prediction. 1 ○ gives the predicted class for the individual to explain (labelled churner by the scoring model, with a probability of 69%). 2 ○ gives the predicted class for the proposed counterfactual (labelled non churner as with a probability of churn of 21%). A colour code allows the identification of each class (here orange for a churner, and green for a non churner). As expected the class of the counterfactual is different from those of the observed individual. The pie chart 3

○ shows the proportion of variables in the individual that have been modified to generate the counterfactual. By clicking on it, one can navigate between the modified variables and those that have remained unchanged. A drop-down menu 4

○ allows you to select the individuals. The central part of the interface is dedicated to the modified variables between the individual and the counterfactual. Here 7 variables were changed. The direction of the change is specified by an arrow with its magnitude in the case of a numerical variable 5

○. In the case of a categorical variable, the change is indicated by an upward arrow pointing to the new modality 6 ○. Additionally, the variable changes are summarized in textual form in the lower part of the interface 8

○. The text also precises whether the individual had been misclassified by the decision model (if the information is available) by a circle with a hatched pattern 9 ○.

By clicking on 7

○, the user accesses another screen (see Figure 2), where he/she can select another counterfactual depending on whether he/she wants to focus on sparsity (as few modified variables as possible) or prediction performance (the lowest predicted score for the counterfactual for the individual class). The counterfactual that requires the least number of modified variables is proposed by default. Finally, a home page (not shown here) gives a description of the analyzed data (characteristics and semantic of variables).

Implementation

The implementation is based on Flask, which is a micro-framework for web development in Python to present data and display web pages. Visualizations and interactions are created using JavaScript and d3js. Flask applications can easily be embedded in website or even in Jupyter Notebooks. In this demo, we use HTML and CSS to create the web pages. We can interface with any prediction model, and any counterfactual explanation generator. The data needed for the visualization is provided via a JSON file which must include the variables names and 2 variable/instance matrices, one with the instances to explain and another with the counterfactuals. The file must also contain some classification results: the prediction probabilities of the model and the predicted classes both for the instances to explain and their counterfactuals. 63 Use case study

We illustrate the tool on the Telco Customer Churn dataset [1] which contains 7,043 instances described by 20 input variables. The goal is to predict the churn of a telecom operator's customers (with 2 classes: churn vs no churn). For our experiments we used VCNet, an architecture that is able to generate at the same time the decision and a counterfactual explanation and is well adapted for processing mixed tabular data [START_REF] Guyomard | VCNet: A self-explaining model for realistic counterfactual generation[END_REF]. We discuss the analysis of the example shown in Figure 1. It corresponds to an individual (Id 1682) labelled by the decision model as a churner with a probability of 69%. The displayed counterfactual changes the class of the example from churn to no churn with a 79% probability of no churn (21% probability of churn). The counterfactual was obtained by the modification of 7 variables from the initial example (37% of the input variables). The reader who wants more details about the changes can look at the details in Figure 1. Figure 2 shows that other counterfactuals with a good compromise on the performance and sparsity objectives are available. A first counterfactual that proposes the modification of 2 variables (decrease of the monthly bill from 89.5$ to 77.25$ and modification of the payment method) reduces the probability of churn from 69% to 49%. The other counterfactuals can be discussed in the same way. The business expert is thus able to choose the criterion that seems the best between sparsity and classification score.

Further developments

The tool presented will evolve to include new features. For now, interactions with the user are limited to the choice of a counterfactual in a possible set according to criteria of sparsity or classification performance. The user could also be interested in selecting the variables that make up the counterfactual. Another area for improvement concerns the textual formalization of the explanation, which is currently very limited. Work on the ergonomics of the interface would also be of interest, as would a user study.

Fig. 1 .

 1 Fig. 1. Interface for presenting an example to be explained and an associated counterfactual.

Fig. 2 .

 2 Fig. 2. Interface for alternative counterfactual selection according to the two axes sparsity/classification score.

https://drive.google.com/file/d/1yog5J1QVq2zQ9WK4P3ujg4Zxn_NZScJB/view? usp=share_link

https://github.com/fwallyn/counterfactualViz


Victor Guyomard
email: victor.guyomard@orange.com

Françoise Fessant

Thomas Guyet

Tassadit Bouadi

Alexandre Termier

Generating robust counterfactual explanations

Keywords: Counterfactual explanation, Robustness, Algorithmic recourse

Introduction

The ever-increasing use of machine learning models in critical decision-making contexts, such as health care, hiring processes or credit allocation, makes it essential to provide explanations for the individual decisions made by these models. To this end, Wachter et al. proposed counterfactual explanation [START_REF] Wachter | Counterfactual explanations without opening the black box: Automated decisions and the GDPR[END_REF]. A counterfactual is defined as the smallest modification of feature values that changes the prediction of a model to a given output. The counterfactual can provide actions (or recourse) for individuals to attain more desirable outcomes. This is particularly important in areas where decisions made by algorithms can have significant impacts on people's lives such as finance, health care or criminal justice. Many methods have been proposed to generate counterfactuals, focusing on some specific properties such as realism [START_REF] Pawelczyk | Learning model-agnostic counterfactual explanations for tabular data[END_REF][START_REF] Van Looveren | Interpretable counterfactual explanations guided by prototypes[END_REF][START_REF] Guyomard | VCNet: A self-explaining model for realistic counterfactual generation[END_REF], actionability [START_REF] Ustun | Actionable recourse in linear classification[END_REF][START_REF] Poyiadzi | Face: feasible and actionable counterfactual explanations[END_REF] or sparsity [START_REF] Brughmans | Nice: an algorithm for nearest instance counterfactual explanations[END_REF][START_REF] Wachter | Counterfactual explanations without opening the black box: Automated decisions and the GDPR[END_REF][START_REF] Mothilal | Explaining machine learning classifiers through diverse counterfactual explanations[END_REF]. According to Artelt et al. [START_REF] Artelt | Evaluating robustness of counterfactual explanations[END_REF], many counterfactual generation methods are vulnerable to small changes, where even a minor change in the value of a counterfactual feature can cause the counterfactual to have a different outcome. Such a situation may arise for example in practical implementation of the counterfactual, due to various factors such as unexpected noise, or adversarial manipulation. As an illustration, a counterfactual may suggest to an individual to raise its salary by 200$ to obtain a credit, but in practice, the salary is increased by 199$ or 201$, potentially resulting in a negative decision (a rejected credit) regarding the decision model. This line of discussions falls into the topic of robustness [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF][START_REF] Dominguez-Olmedo | On the adversarial robustness of causal algorithmic recourse[END_REF][START_REF] Virgolin | On the robustness of sparse counterfactual explanations to adverse perturbations[END_REF][START_REF] Maragno | Finding regions of counterfactual explanations via robust optimization[END_REF]. To address robustness in the context of counterfactual explanation, Pawelcyk et al. [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF] introduce the notion of recourse invalidation rate which represents the probability of obtaining a counterfactual with a different predicted class, when small changes (sampled from a noise distribution) are applied to it. They presented an estimator of the recourse invalidation rate in the context of Gaussian distributions, and also a framework (PROBE) that guarantees the recourse invalidation rate to be no greater than a target specified by the user. A limitation of their approach is that the satisfaction of the user condition is dependent of the estimator quality, which means that in practice, the recourse invalidation rate can be greater than the target fixed by the user. Moreover, PROBE leads in practice to a poor trade-off management between proximity and robustness i.e the counterfactual is robust but far from the example to explain. In this paper, we introduce a framework called CROCO (Cost-efficient RObust COunterfactuals), which is based on a new minimization problem inspired by PROBE [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF]. Our framework introduces the novel concept of soft recourse invalidation rate, as well as an estimator of it. It enables us to derive an upper-bound for the recourse invalidation rate with almost certain probability. This ensures that the user obtains a solution with a recourse invalidation rate lower than the predetermined target. An experimental evaluation on different tabular datasets confirms these theoretical results, and shows that our method better optimizes the two criteria of robustness and proximity.

Related work

Since Wachter et al. seminal paper [START_REF] Wachter | Counterfactual explanations without opening the black box: Automated decisions and the GDPR[END_REF], a variety of counterfactual explanation technics have been proposed. These methods seek to enhance the quality of counterfactuals by incorporating additional properties, such as constraining the counterfactual to support the data distribution in order to produce realistic examples, freezing immutable features (such as race or gender), producing multiple counterfactuals at once, or even adding causality constraints. We refer the readers to Guidotti et al. [START_REF] Guidotti | Counterfactual explanations and how to find them: literature review and benchmarking[END_REF] for a detailed review about counterfactual explanation properties and methods. The property of robustness has been studied recently in the context of counterfactual explanations, where the validity of a counterfactual is determined by its ability to maintain the same predicted class in the presence of changes. Mishra et al. [START_REF] Mishra | A survey on the robustness of feature importance and counterfactual explanations[END_REF] distinguish various types of robustness:

Robustness to model change refers to the evolution of the validity of the counterfactual explanation when machine learning models are re-trained or when training parameters settings are slightly modified. Rawal et al. [START_REF] Rawal | Algorithmic recourse in the wild: Understanding the impact of data and model shifts[END_REF] have demonstrated that state-of-the-art counterfactual generation methods have the tendency to produce solutions that are not robust to model retraining.

To address this problem, Ferrario and Loi [START_REF] Ferrario | The robustness of counterfactual explanations over time[END_REF] proposed to use counterfactual data augmentation every time machine learning models are retrained. Upadhyay et al. [START_REF] Upadhyay | Towards robust and reliable algorithmic recourse[END_REF] for their part developed an adversarial training objective that produces counterfactuals that are robust regarding changes in the training data. More specifically, they evaluated the robustness on different types of training data shift which are data correction shift, temporal shift, and geospatial shift. However, the counterfactuals that are generated suffer from a much higher cost of change regarding state-of-the art counterfactual generation methods [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF]. To address this issue they propose to solve an optimization problem that includes a density constraint [START_REF] Artelt | Evaluating robustness of counterfactual explanations[END_REF]. They empirically show that having a counterfactual that lies in a dense area has the effect of improving the robustness. Laugel et al. [START_REF] Laugel | Issues with post-hoc counterfactual explanations: a discussion[END_REF] pointed out that such a type of robustness issue cannot solely be attributed to the explainer, but also arises from the decision boundary of the classifier, thus increasing the problem complexity. Robustness to counterfactual input changes refers to the ability of a counterfactual explanation to remain valid when small feature changes are applied (two similar counterfactuals should have the same predicted class). In this context, Pawelcyk et al. [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF] presented PROBE a framework to produce robust counterfactuals that is based on an optimization problem. This framework aims to find a trade-off between two criteria that are the recourse invalidation rate and the proximity, i.e. the distance between the counterfactual and the example to explain. From their side, Maragno et al. [START_REF] Maragno | Finding regions of counterfactual explanations via robust optimization[END_REF] introduced an adversarial robust approach that generates counterfactuals that remain valid in an uncertainty set, meaning that for a given example to explain, all the solutions in the set are valid counterfactuals. This approach works for non-differentiable model unlike PROBE. However there is no trade-off between the recourse invalidation rate and the proximity as all the counterfactuals in the uncertainty set are valid. In such a scenario, the robustness constraint cannot be relaxed, then allowing the generation of counterfactuals that are far from the example to explain. Our approach, CROCO, is part of this category of methods. It is inspired by the PROBE framework, and improves its limitations. Indeed, the major criticism that we can make to PROBE is that the guarantees in terms of robustness that it offers to the user are completely dependent on the quality of their estimator (i.e. the guarantee is based on a recourse invalidation rate approximation rather than the true recourse invalidation rate). Our method introduces a new optimiza-tion problem that is proved to induce an almost-sure upper bound on the true recourse invalidation rate. This leads to a significant improvement in the trade-off between the robustness of the counterfactual and the proximity with the example to explain.

Problem statement

In this section, we define some notations related to the generation of counterfactuals, and we formalize the robustness of counterfactual generation by introducing the notion of recourse invalidation rate.

Generation of counterfactuals

We consider the generation of counterfactuals for a binary classifier. Let X ⊆ R n represents the n-dimensional feature space. A binary classifier is a function h : X → Y where Y = {0, 1}. We assume that the classification is obtained from a probabilistic prediction i.e. a function f : X → [0, 1] that returns p which is the predicted probability for the class 1. Then, the predicted class is the most likely class according to p. For a given example x, h(x) = g • f (x) where g : [0, 1] → Y is a function that returns the predicted class from the probability vector. We take g(u) = 1 >t (u), where t is the decision threshold. 1 >t (u) equals 1 if u > t and 0 otherwise. In this article, we do post-hoc counterfactual generation, meaning that f (and thus h) are given. And for a given example to explain x ∈ X , whose decision is h(x), we want to generate a counterfactual x ∈ X . A counterfactual is a new example close to the example to explain x, and with a different prediction, i.e. h(x) ̸ = h(x). If it is true that h (x) ̸ = h (x), then x is said to be valid. A counterfactual x is also seen as a change to apply to x: x = x + δ where δ ∈ R n . Thus, a counterfactual is associated to a small change δ that modifies the decision returned by h. Generating a counterfactual is basically solving the following optimization problem:

min δ ℓ (f (x + δ) , 1 -h(x)) + λ ∥δ∥ 1 (1)
where ℓ : [0, 1] 2 → R + quantifies the distance between the predicted probability, f (x), and 1 -h(x) that is the opposite of the predicted class for example x.

For instance, Wachter et al. suggested ℓ as the L 2 distance, so as to produce counterfactuals that are close to the desired decision [START_REF] Wachter | Counterfactual explanations without opening the black box: Automated decisions and the GDPR[END_REF]. The other term in the optimization problem, constraints the change δ applied to the example x to be small.

In what follows, we will focus specifically on the generation of counterfactuals in the case of instances that have received a negative decision (which corresponds to instances predicted as class 0). This choice has no limitation and is motivated by the fact that the majority of robustness methods are defined in a recourse context [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF][START_REF] Rawal | Algorithmic recourse in the wild: Understanding the impact of data and model shifts[END_REF][START_REF] Upadhyay | Towards robust and reliable algorithmic recourse[END_REF] where the goal is to provide explanations only for negatively predicted instances. We will also assume that the classifier f is differentiable.

Recourse invalidation rate

In order to quantify the robustness of the counterfactual to an input perturbation, the notion of recourse invalidation rate has been introduced by Pawelczyk et al. [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF].

Definition 1 (Recourse invalidation rate). The recourse invalidation rate for a counterfactual x, of an example x predicted as class 0 can be expressed as:

Γ (x; p ε ) = E ε∼pϵ [1 -h (x + ε)] where ε ∈ R n is a random variable that follows a probability distribution p ε . Since h (x + ε) ∈ {0, 1}, it ensues Γ (x; p ε ) ∈ [0, 1].
Assuming p ε is centered, then p ε defines a region around a counterfactual x for similar counterfactuals x + ε. Intuitively, Γ (x; p ε ) gives the rate of similar counterfactuals that are not valid, i.e. that belong to class 0. Thus, the lower Γ (x; p ε ), the more robust is the counterfactual. If Γ (x; p ε ) = 0, the counterfactual is considered perfectly robust, given that all the perturbed counterfactuals result in positive outcomes (i.e., there are all predicted as class 1). However, if Γ (x; p ε ) = 1, the counterfactual is not at all considered robust, since no noisy counterfactuals lead to positive outcomes (i.e., there are all predicted as class 0).

Figure 1 illustrates the intuition of the recourse invalidation rate. Γ (x; p ε ) can be seen as the surface of the neighborhood that overlaps the region, split by the decision frontier, on the side of the example. This neighborhood represents the perturbations on the counterfactuals that we would like to accept without changing its validity. The Figure also shows that finding a robust counterfactual requires to make a trade-off between the robustness and the magnitude of the change.

The PROBE framework for generating robust counterfactuals

Pawelczyk et al. [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF] have developed a framework named PROBE that generates robust counterfactuals regarding the recourse invalidation rate. It adapts the minimization problem of equation 1 by adding a new term that enforces the recourse invalidation rate to be under a target value Γ t . This target value is chosen by the user. More formally, generating a counterfactual relies on solving the following minimization problem:

min δ max [Γ (x + δ; p ε ) -Γ t , 0] + ℓ (f (x + δ) , 1 -h(x)) + λ ∥δ∥ 1 (2)
There are some difficulties with the additional constraint on recourse invalidation rate. Indeed, the true value of Γ can not be evaluated in practice. Then, PROBE proposes a Monte-Carlo estimator of Γ . This means that it is estimated by computing the mean of a sample of perturbations in p ε :

Γ (x; K, p ε ) = 1 K K k=1 (1 -h (x + ε k )) (3)
Fig. 1. Illustration of the recourse invalidation rate with a uniform distribution pε (dashed-red circle). The recourse invalidation rate is figured out by the area of the region in red. In (1) the counterfactual has a low robustness and is at a low distance from the example. In (2) the counterfactual has a medium robustness and is at a medium distance, and in (3) the counterfactual has a perfect robustness but is far from the example (large distance).

Fig. 2. Illustration of the potential problem with PROBE. The red region illustrates the true recourse invalidation rate (see Figure 1) while the green region illustrates the approximated recourse invalidation rate through the approximation of the red region. In this case, the approximation under-estimates the red region and misleadingly encourages finding a x that would break the robustness constraint.

However, Γ is non-differentiable, because h(x) = g • f (x) and g(u) = 1 >t . Then, it can not be part of a loss of an optimization problem. To overcome this limitation, the authors proposed a first-order approximation of the true recourse invalidation rate Γ in the context of a Gaussian distribution noise p ε = N (0, σI), named ΓPROBE .

Then, the optimization algorithm solves the problem in eq. 2, replacing Γ by ΓPROBE and stops when the approximation of recourse invalidation rate is under the target value, i.e. when ΓPROBE ( x; p ε ) ≤ Γ t .

Thus, for a given counterfactual x returned by PROBE, the user is guaranteed that ΓPROBE (x; p ε ) ≤ Γ t . However, this means that the guarantee depends on the quality of the estimator. Indeed, it is possible to generate a counterfactual where ΓPROBE (x; p ε ) ≤ Γ t ≤ Γ (x; p ε ) which would then violate the user-selected guarantee. The intuition behind this situation is depicted in Figure 2.

To sum up, PROBE has two limitations: 1) It offers users a guarantee based on the recourse invalidation rate approximation rather than the true recourse invalidation rate; 2) the approximation applies only for Gaussian distribution of counterfactual perturbation. This makes the approach not applicable to dataset with categorical attributes.

Our contribution overcomes the first limitation by introducing a new estimator that is proved to induce an almost-sure upper bound on the true recourse invalidation rate. Furthermore, our approach is independent to the noise distribution, thus enabling the use of various noise distributions.

Our contribution

In this section, we present our method, named CROCO standing for Cost-efficient RObust COunterfactuals. It improves the generation of robust counterfactuals according to the recourse invalidation rate.

This method, inspired from PROBE, introduces a new robustness term to the optimization problem presented in Equation 1. This term is based on an upper-bound of the recourse invalidation rate.

An upper bound of the recourse invalidation rate

As it is not feasible to derive a closed-form expression of Γ without making any assumption about the noise distribution, and given that Γ is not differentiable, our idea is to compute an upper-bound of Γ .

Let x be a counterfactual for an example x ∈ X , then we define the soft recourse invalidation rate, Θ(x) by:

Θ(x; p ε ) = E ε∼pε [1 -f (x + ε)] .
The proposition 1 states that the soft recourse invalidation rate, Θ, induces an upper-bound of the recourse invalidation rate, Γ . Proposition 1. 4 Let t ∈ [0, 1] be a decision threshold and x be a counterfactual for an example x ∈ X , an upper bound of the true recourse invalidation rate is given by:

Γ (x; p ε ) ≤ Θ (x; p ε ) (1 -t) (4)
Similarly to Γ , Θ can not be evaluated directly. However, we can use the following Monte-Carlo estimator, where K is the number of random samples:

Θ (x; K, p ε ) = 1 K K k=1 (1 -f (x + ε k )) (5)
This quantity can be seen as the mean predicted probability for class 0, computed on perturbed samples that are randomly drawn from the p ϵ distribution. The proposed estimator is close to the recourse invalidation rate estimation outlined in equation 3, but it differs in that it is differentiable as a composition of differentiable functions, thus can be included in an objective function. Moreover, the proposition 2 shows that our estimator, Θ, defines an almostsure upper bound of the true recourse invalidation rate. This means that m+ Θ 1-t has a high probability to be an upper-bound of Γ . Proposition 2. Let t ∈ [0, 1] be a decision threshold, p ε a noise distribution, x be a counterfactual for an example x ∈ X , then an almost-sure upper-bound of the recourse invalidation rate is given by:

P Γ (x; p ε ) ≤ m + Θ (x; K, p ε ) 1 -t ≥ 1 -exp -2m 2 K (6)
where m > 0 and K is the number of random samples.

With a high number of random samples and a given value of m, the exponential term of proposition 2 can be arbitrarily small. Then for a given value of our estimator Θ (x; K, p ε ), we have almost surely that the true recourse invalidation rate will be in the worst case equals to m + Θ (x; K, p ε ) 1 -t . It ensues that if we enforce m + Θ (x; K, p ε ) 1 -t to be lower than a given threshold Γt , then we are almost-sure that the true recourse invalidation rate is lower than Γt , i.e. that the counterfactual is more robust than the given threshold. Note that m ∈ R >0 is a parameter that defines the tightness of the upperbound. The lower m, the better the upper-bound. In return, low m requires a higher K (i.e. more computational resource) to keep the confidence in the bound. Section A.2 in supplementary material provides a table to choose the values of m and K with respect to the desired level of confidence.

For instance, with K = 500 and m = 0.1, and t = 0.5, the inequation of the proposition 2 gives:

P Γ (x) ≤ 0.2 + 2 Θ (x) ≥ 0.999 (7)

Generate robust counterfactuals

We propose a minimization problem for the generation of robust counterfactuals according to the recourse invalidation rate. Given a neighborhood distribution p ε , a number of samples K, a tightness value m > 0 and a target upper-bound Γt , a counterfactual x = x + δ is found by minimizing the following objective function:

min δ Θ (x + δ; K, p ε ) + m 1 -t -Γt 2 Robustness + ℓ (f (x + δ) , 1 -h(x)) Validity + λ ∥δ∥ 1 Proximity (8)
Algorithm 1 CROCO optimization for counterfactual generation

Input: x s.t. f (x) < t, f , λ > 0, α, Γt > 0, K,pε Output: x + δ δ ← 0; Compute Θ (x + δ; K, pε) while f (x + δ) < t and m+ Θ(x+δ;K,pε) 1-t > Γt do δ ← δ -α • ∇ δ L CROCO (x + δ; Θt, pε, λ) ▷ From equation 8 Update Θ (x + δ; K, pε) end while Return: x + δ
The last two terms implement the classical trade-off for counterfactual generation. Indeed, the second term pushes the counterfactual class toward a class that differs from the example class (if h(x) = 0 then we want h(x) = 1), while the last term minimizes the distance between the counterfactual and the example to explain.

The first term encourages our new estimator to be close to a target value Γt , i.e. the target upper-bound of the recourse invalidation rate. This pushes to choose a counterfactual that has an upper bound close to the objective.

Algorithm 1 describes the optimization process for CROCO. Gradient steps are performed until the counterfactual predicted class is flipped (f (x + δ) ≥ t), and the value of the upper-bound m+ Θ(x+δ;K,pε) 1-t is below the target value Γt . CROCO has several benefits, it allows the user to generate counterfactuals with almost surely a minimal robustness, and this agnostically to the noise distribution. Moreover, our optimization problem relies on an almost-sure upper bound of the true recourse invalidation rate instead of relying on an approximation as Pawelcyk et al. did with PROBE [START_REF] Pawelczyk | Probabilistically robust recourse: Navigating the trade-offs between costs and robustness in algorithmic recourse[END_REF]. Our intuition is that this will in practice improve the trade-off between proximity and robustness.

Experiments and results

We have divided our experiments into two sections. After experimentally confirming that our approach preserves the validity of the counterfactuals, the purpose of the first section is to demonstrate empirically that CROCO provides an effective management of the trade-off between proximity and robustness in comparison to PROBE. In the second section, we demonstrate experimentally that the counterfactuals returned by CROCO exhibits a lower degree of invalidation with respect to the user-defined target than PROBE do.

First of all, we describe the datasets that we used for evaluation, along with the metrics we employed as well as the predictive model details.

Experimental setting

For a fair comparison, we used the CARLA library [START_REF] Pawelczyk | CARLA: A python library to benchmark algorithmic recourse and counterfactual explanation algorithms[END_REF], which was also used for evaluating PROBE. It contains three binary classification datasets: Adult, Give Me Some Credit (GSC), and COMPAS. These datasets contain both numerical and categorical features. Both numerical and categorical variables are used to train the classifier, but the counterfactuals are generated by modifying only the numerical variables. The proportion of categorical variables for each dataset are respectively 3/7, 1/12 and 25/40. Additional details about these datasets are available in the section A.4 of the supplementary material. For every dataset, the classification model, f , is the fully connected neural network implemented in the CARLA library 5 . It is composed of 50 hidden layers and ReLU activation functions.

We used for evaluation the following metrics:

Validity A counterfactual x of an example x is valid if the classification model predicts different classes for x and x [START_REF] Mothilal | Explaining machine learning classifiers through diverse counterfactual explanations[END_REF][START_REF] De Oliveira | A framework and benchmarking study for counterfactual generating methods on tabular data[END_REF]. Formally:

Validity = 0, if f (x) = f (x) 1, if f (x) ̸ = f (x)
The validity measure lies in [0, 1]. The higher it is, the better. Distance The distance is the L 1 distance between an example, x and its counterfactual, x [START_REF] Mothilal | Explaining machine learning classifiers through diverse counterfactual explanations[END_REF][START_REF] Wachter | Counterfactual explanations without opening the black box: Automated decisions and the GDPR[END_REF].

Distance = ∥x -x∥ 1 = ∥δ∥ 1
A low value indicates fewer changes of features to apply to the original example to obtain the counterfactual. As the distance decreases, the proximity increases. In the context of counterfactual generation, we assume that the lower the distance, the more actionable the counterfactual, the better. Recourse invalidation rate We used Γ (see equation 3) to evaluate recourse invalidation rate, i.e. the robustness of the counterfactual. This value indicates the risk to have an invalid counterfactual in case the counterfactual is slightly changing wrt to the automatically recommended counterfactual. The lower, the better. The recourse invalidation rate makes the assumption of a neighborhood represented by a distribution, p ε . CROCO makes no hypothesis on this distribution but PROBE requires a Gaussian distribution. For the sake of fairness, we use a centered Gaussian distribution with a parameterized variance σ for the two methods.

For each dataset, we run PROBE with σ 2 ∈ {0.005, 0.01, 0.015, 0.02} and Γ t ∈ {0.05, 0.10, 0.15, 0.2, 0.25, 0.3, 0.35}. Regarding the setting of CROCO, we choose K = 500, m = 0.1, t = 0.5. λ is found through an iterative procedure that is described in section A.5.2 of supplementary material. For each dataset, we run CROCO with the same parameters as PROBE: σ 2 ∈ {0.005, 0.01, 0.015, 0.02} and Γt ∈ {0.05, 0.10, 0.15, 0.2, 0.25, 0.3, 0.35}.

We also include the approach of Wachter et al. [START_REF] Wachter | Counterfactual explanations without opening the black box: Automated decisions and the GDPR[END_REF] (referred to as Wachter ) in our experiment. This counterfactual generation method establishes a baseline for recourse invalidation rate. In our experiments, we generated 500 counterfactuals for each dataset and each parameterized method. We collected their recourse invalidation rate, distance and validity, that are discussed in the following.

Comparisons between PROBE and CROCO

In this section, the quality of the counterfactuals generated using CROCO, PROBE and Watcher is compared.

First of all, Watcher and CROCO achieves a perfect validity for all datasets. PROBE achieved a perfect validity on all datasets, except for two counterfactual sets, that corresponds to the COMPAS dataset where σ 2 = 0.005 and Γ t = 0.3 and also the GSC dataset where σ 2 = 0.02 and Γ t = 0.05. As a consequence, in the following, we focus the analysis on the trade-off between the distance and the recourse invalidation rate. The section A.3.1 of the supplementary material contains details regarding the validity obtained for each dataset, and counterfactual sets that are generated.

Figure 3 compares Watcher, PROBE and CROCO regarding the distance and recourse invalidation rate on the three different datasets. Each point of a given curve corresponds to the mean recourse invalidation rate and the mean distance that is obtained from CROCO or PROBE by fixing a target value. Note that Watcher has only one point as it has no recourse invalidation rate target parameter. The standard-deviation values are provided in section A.3.2 of supplementary material. Note that for a given curve, the points are linked by order of increasing target value.

For the GSC dataset, CROCO achieves both smaller distances (higher proximities) and lower recourse invalidation rates compared to PROBE, regardless of the value of σ 2 . The same conclusion can be drawn for the COMPAS dataset, except for σ 2 = 0.005 where CROCO achieves smaller recourse invalidation rates but at the cost of higher distances.

Regarding the Adult dataset, we observe that PROBE is unstable, as it can produce solutions with higher recourse invalidation rate than the target fixed by the user (where Γ ≥ Γ t ). On the other hand, CROCO is stable and achieves both smaller distances (higher proximities) and lower recourse invalidation rates. We also noticed that on all the datasets, distance values increase when σ 2 increased, thus confirming the presence of a trade-off between the two quantities.

When solutions are closely clustered together in terms of mean distances, both PROBE and CROCO exhibit similar standard deviation values. However, when solutions are more widely dispersed, PROBE tends to have higher standard deviation values compared to CROCO (see section A.3.2 of supplementary material).

We observed that for all datasets and values of σ 2 , PROBE and CROCO outperform Wachter in terms of recourse invalidation rates. The only exception is the Adult dataset when Γ t = 0.35, where PROBE produces higher recourse invalidation rates due to instability issues.

Target invalidation study

For each counterfactual that is obtained from PROBE or CROCO, we computed the recourse invalidation rate and compared it with the targeted recourse invalidation rate. 6 The results are provided in Figure 4. The graphics figure out the diagonal representing the exact match between the targeted and the recourse invalidation rate. All points that are above this diagonal correspond to counterfactuals that do not achieve the robustness requested by the user. We notice that with PROBE, the recourse invalidation rates frequently exceed the target Comparison between targeted recourse invalidation rate and recourse invalidation rate. Each column corresponds to a dataset and each line to a value of σ 2 ∈ {0.005, 0.01, 0.015, 0.02}. In each subplot, the value of σ 2 is fixed. Each point corresponds to a counterfactual, on the x-axis is presented the target recourse invalidation rate for the counterfactual, and on the y-axis the recourse invalidation rate that is computed.

fixed by the user. It illustrates that the approximation of Γ made by PROBE is too loose. In contrast, for CROCO, the recourse invalidation rates are typically lower, indicating that the user-specified target is less invalidated. We computed the upper bound value derived in proposition 2 for each counterfactual obtained from CROCO.

Figure 5 of section A.3.3 of the supplementary material illustrates the evolution of the upper bound value ( m+ Θ 1-t ) with regard to the recourse invalidation rate for different values of σ 2 . Our analysis show that the theoretical bound is not violated. This means that even in cases where CROCO failed to find a solution that matches the user target (i.e., where m+ Θ 1-t > Γt ), we can still provide the user a guarantee on the true recourse invalidation rate. This guarantee is based on the value of Θ that is obtained at the end of the optimization.

Conclusion

In this paper, we introduce CROCO, a novel framework for generating counterfactuals that are robust to input changes. A robust method guarantees that the slightly perturbed counterfactual is still valid. Our approach leverages a new estimator that provides a theoretical guarantee on the true recourse invalidation rate of the generated counterfactuals. Through experiments comparing CROCO to the state-of-the-art PROBE method, we demonstrate that our approach achieves a better trade-off between recourse invalidation rate and proximity, while also leading to less invalidation regarding the user-specified target. While these initial results are promising, it is necessary to evaluate CROCO on a larger number of datasets to confirm the robustness of the performance obtained. Moving forward, we plan to extend the capabilities of CROCO by adapting it to handle categorical variables. Since our approach is independent to the noise distribution, it seems reasonably possible to generate robust counterfactuals for data with both numerical and categorical variables. CROCO is implemented in the CARLA framework and will be soon available for practical usage.

Fig. 3 .

 3 Fig.3. Trade-off between recourse invalidation rate and distance with Gaussian distribution noises. Each column corresponds to a dataset and each line to a value of σ 2 ∈ {0.005, 0.01, 0.015, 0.02}. In each subplot the value of σ 2 is fixed. Each point of a curve corresponds to a mean recourse invalidation rate and a mean distance for a given target, we have target ∈ {0.05, 0.10, 0.15, 0.2, 0.25, 0.3, 0.35}. The points are connected by target order.

  Fig. 4. Comparison between targeted recourse invalidation rate and recourse invalidation rate. Each column corresponds to a dataset and each line to a value of σ 2 ∈ {0.005, 0.01, 0.015, 0.02}. In each subplot, the value of σ 2 is fixed. Each point corresponds to a counterfactual, on the x-axis is presented the target recourse invalidation rate for the counterfactual, and on the y-axis the recourse invalidation rate that is computed.

  In the context of slightly changed training settings, Black et al.[START_REF] Black | Consistent counterfactuals for deep models[END_REF] achieved robust counterfactual explanations with a regularization method based upon a K-Lipschitz constant.

	Robustness to input perturbations refers to how counterfactuals explana-
	tions are sensitive to slight input changes. According to Dominguez-Olmedo
	et al. [4], a counterfactual is said robust if small changes in the example
	to explain result in valid counterfactuals. They proposed an optimization
	problem that applies to linear models and neural networks to generate ro-
	bust counterfactuals in this context. For Artelt et al. [1] robustness means
	that two examples that are close, must result in two similar counterfactuals.

All proofs are provided in Section A.1 of supplementary material.

Function carla.models.catalog.MLModelCatalog of the CARLA library.