Demystifying Attention Mechanisms for Deepfake Detection

Demystifying Attention Mechanisms for Deepfake Detection

Abhijit Das 1 , Srijan Das 2 and Antitza Dantcheva 3,4 1 Thapar Institute of Engineering & Technology, Patiala, India 2 Stony Brook University, USA, 3 Inria, France, 4 Université Côte d'Azur, France Abstract-Manipulated images and videos, i.e., deepfakes have become increasingly realistic due to the tremendous progress of deep learning methods. However, such manipulation has triggered social concerns, necessitating the introduction of robust and reliable methods for deepfake detection. In this work, we explore a set of attention mechanisms and adapt them for the task of deepfake detection. Generally, attention mechanisms in videos modulate the representation learned by a convolutional neural network (CNN) by focusing on the salient regions across space-time. In our scenario, we aim at learning discriminative features to take into account the temporal evolution of faces to spot manipulations. To this end, we address the two research questions 'How to use attention mechanisms?', and 'What type of attention is effective for the task of deepfake detection?' Towards answering these questions, we provide a detailed study and experiments on videos tampered by four manipulation techniques, as included in the FaceForensics++ dataset. We investigate three scenarios, where the networks are trained to detect (a) all manipulated videos, (b) each manipulation technique individually, as well as (c) the veracity of videos pertaining to manipulation techniques not included in the train set.

I. I

Manipulated images and videos have become increasingly realistic and hence can pose serious security concerns and threats. Given that our society relies heavily on the ability to produce and exchange legitimate and trustworthy documents, forged images in driver's licences and passports can imply serious and far-reaching negative consequences on businesses, individuals, and political entities. While in the past multimedia manipulation was time consuming and costly, deep learning has well reduced costs, time and skill needed for realistic manipulation.

In the context of computer vision, creating deepfakes is an intriguing novel area of research [START_REF] Wang | ImaGINator conditional spatio-temporal gan for video generation[END_REF], [START_REF] Wang | G3AN: This video does not exist. Disentangling motion and appearance for video generation[END_REF], [START_REF] Wang | InMoDeGAN interpretable motion decomposition generative adversarial network for video generation[END_REF]. However, deepfakes entail a number of challenges and threats, given that such manipulations can fabricate animations of subjects involved in actions that have not taken place, and such manipulated data can be spread rapidly via social media. Particularly, we cannot trust anymore, what we see or hear on video, as deepfakes betray sight and sound, the two predominantly trusted human innate senses [START_REF] Silbey | The upside of deep fakes[END_REF].

We can foresee deepfakes entailing the premise to inflict severe damage. Social threats [START_REF] Chesney | Deep fakes: A looming challenge for privacy, democracy, and national security. 107 california law review[END_REF], [START_REF] Eichensehr | Don't believe it if you see it: Deep fakes and distrust[END_REF] can affect domains such as journalism and news media journalists . In this context, we have two cases of concern. The first being deepfakes being considered as real, and the second relating to real videos being considered as fake.

Recent research on deepfake generation is able to forge short videos [START_REF] Thies | Face2face: Real-time face capture and reenactment of rgb videos[END_REF], [START_REF] Kim | Deep video portraits[END_REF], as well as to generate videos from a single ID photo [START_REF] Averbuch-Elor | Bringing portraits to life[END_REF]. In addition, fully synthesized audiovideo images are able to replicate synchronous speech and lip movement [START_REF] Suwajanakorn | Synthesizing obama: learning lip sync from audio[END_REF] of a target person. Several deepfakeschemes have evolved till date. Head puppetry where the dynamics of a head from a source person are synthesized in a target person and face swapping where the whole face of a target person is swapped with that of a source person. Lip syncing the lip region of the target person is reenacted by the lip region of a source person are also performed in the first category. Currently such manipulations include subtle imperfections that can be detected by humans and, if trained well, by computer vision algorithms [START_REF] Li | In ictu oculi: Exposing AI generated fake face videos by detecting eye blinking[END_REF], [START_REF] Korshunov | Vulnerability assessment and detection of deepfake videos[END_REF], [START_REF] Agarwal | Protecting world leaders against deep fakes[END_REF]. Towards detecting such attacks a number of multimedia forensics based detection strategies have been proposed [START_REF] Agarwal | Protecting world leaders against deep fakes[END_REF], [START_REF] Sabir | Recurrent convolutional strategies for face manipulation detection in videos[END_REF], [START_REF] Amerini | Deepfake video detection through optical flow based cnn[END_REF], [START_REF] Dang | On the detection of digital face manipulation[END_REF]. We note that such techniques have not been generalizable, i.e., were not able to provide a comprehensive solution against unseen manipulation techniques.

Therefore, generalizable deepfake detection remains a challenge. Existing detection methods [START_REF] Tolosana | Deepfakes evolution: Analysis of facial regions and fake detection performance[END_REF], [START_REF] Xu | Adversarial attacks and defenses in images, graphs and text: A review[END_REF] have explored video classification in this context. Specifically, stateof-the-art networks successful in action recognition [START_REF] Wang | A video is worth more than 1000 lies. comparing 3dcnn approaches for detecting deepfakes[END_REF] such as I3D [START_REF] Carreira | Quo vadis, action recognition? a new model and the kinetics dataset[END_REF], 3D ResNet and 3D ResNext [START_REF] Hara | Can spatiotemporal 3D CNNs retrace the history of 2D CNNs and imagenet?[END_REF]. However, bruteforce convolutional operations across space and time do not provide an optimal solution for deepfake detection, as 3D convolutions are too rigid to capture the subtle variations among original and generated fake videos. Therefore, an intuitive direction of research is towards applying attention mechanisms on top of aforementioned convolutional networks, as investigated in [START_REF] Roy | Comparing 3D CNN architectures and attention mechanisms for deepfake detection[END_REF]. This raises a number of open questions related to attention mechanism for deepfake detection. Motivated by the above, in this paper we focus on attention mechanisms and related exploitation for deepfake detection. In particular, we investigate the following.

• What type of attention mechanism is adequate in deepfake detection?

• How should we exploit attention for deepfake detection? To be specific, where in the convolutional neural network the attention layers should be applied? • As deepfake detection constitutes a video classification problem, how should we handle space and time, with respect to attention? Do we need to impose both spatial and temporal attention for deepfake detection? If so, then the next question is, should the network learn joint or dissociated spatio-temporal attention? To answer the above questions, we revisit the popular deepfake detection methods, mostly inspired from the action recognition domain. Empirically, we find that spatio-temporal attention is ornamental for the task of deepfake detection. However, the next question is which type of attention is pertinent for this problem? To this end, our experimental analysis shows that self-attention mechanism when applied to all the convolutional layers is more effective in contrast to attention layers applied on top of the last convolutional layer. Interestingly, this observation is contradictory to the trends observed in action classification models. This suggests that deepfake detection is inherently different from classical action recognition and, hence requires specific approaches. Finally, we also introspect this binary classification problem through vision transformers. This is mostly inspired from the chronology of experiments performed to answer the above questions. We see that vision transformers, unlike for action classification fail to outperform the convolutional counterpart for deepfake detection. But interestingly, the transformers even with small amount of training examples and no pretraining on a large dataset generalize over the training distribution rather than over-fitting as in convolutional networks in this domain. Thus, in this paper, we discuss the best strategies to learn attention for detecting deepfakes. Through our extensive experiments, we show different settings for which a 3D convolutional network can be best exploited for deepfake detection. We also provide the end users a series of choices of networks (including vision transformers) for deepfake detection depending on their constraints. We believe that this experimental study will not only provide solution to best exploit the available resources for deepfake detection, but also shows potential research direction in this domain.

II. R W

Recent overview articles revisit the deepfake detection landscape [START_REF] Tolosana | Deepfakes evolution: Analysis of facial regions and fake detection performance[END_REF], [START_REF] Xu | Adversarial attacks and defenses in images, graphs and text: A review[END_REF]. Generative adversarial networks (GANs) [START_REF] Goodfellow | Generative adversarial nets[END_REF] have put on a direction for face manipulations including identity [START_REF] Karras | A style-based generator architecture for generative adversarial networks[END_REF], [START_REF] Majumdar | Evading face recognition via partial tampering of faces[END_REF], facial attributes [START_REF] Wang | From attributes to faces: a conditional generative adversarial network for face generation[END_REF], as well as facial expressions [START_REF] Liu | Conditional adversarial synthesis of 3D facial action units[END_REF], [START_REF] Jiang | Deeperforensics-1.0: A large-scale dataset for real world face forgery detection[END_REF], [START_REF] Wang | G3AN disentangling appearance and motion for video generation[END_REF], [START_REF] Wang | ImaGINator conditional spatio-temporal gan for video generation[END_REF], [START_REF] Wang | InMoDeGAN interpretable motion decomposition generative adversarial network for video generation[END_REF].

In the context of detecting such deepfakes a number of approaches were based on image-analysis [START_REF] Afchar | Mesonet: a compact facial video forgery detection network[END_REF], [START_REF] Rössler | Faceforensics++: Learning to detect manipulated facial images[END_REF], video analysis [START_REF] Li | In ictu oculi: Exposing AI generated fake face videos by detecting eye blinking[END_REF], [START_REF] Agarwal | Protecting world leaders against deep fakes[END_REF], [START_REF] Sabir | Recurrent convolutional strategies for face manipulation detection in videos[END_REF] or jointly on audio and video analysis [START_REF] Korshunov | Speaker inconsistency detection in tampered video[END_REF]. It is worth mentioning that some video analysis based manipulation approaches perform better than imagebased ones, however such approaches are only applicable to particular kinds of attacks. For instance, many of them [START_REF] Li | In ictu oculi: Exposing AI generated fake face videos by detecting eye blinking[END_REF], [START_REF] Agarwal | Protecting world leaders against deep fakes[END_REF] may fail, if the quality of the eye area is not sufficiently good or the synchronization between video and audio is not sufficiently natural [START_REF] Korshunov | Vulnerability assessment and detection of deepfake videos[END_REF]. Image-based approaches consists of general-purpose detectors, such as algorithm proposed by Fridrich and Kodovsky [START_REF] Fridrich | Rich models for steganalysis of digital images[END_REF] and are hence applicable to both, steganalysis and facial reenactment video detection. Rahmouni et al. [START_REF] Rahmouni | Distinguishing computer graphics from natural images using convolution neural networks[END_REF] presented an algorithm to detect computer-generated images, which was extended to detecting computer-manipulated images.

Agarwal et al. employed both, facial identity as well as behavioural biometrics information to produce the temporal component of videos to classify a video as real or fake [START_REF] Agarwal | Detecting deepfake videos from appearance and behavior[END_REF]. Cozzolino et al. used temporal facial features to learn behaviour of a person [START_REF] Cozzolino | ID-Reveal: Identity-aware deepfake video detection[END_REF]. Guarnera et al. argued that deepfake videos contain a forensic trait pertaining to the generative model used to create them. Specifically, they showed that convolutional traces are instrumental in detecting deepfakes [START_REF] Guarnera | Deepfake detection by analyzing convolutional traces[END_REF]. Khalid and Woo [START_REF] Khalid | Oc-fakedect: Classifying deepfakes using oneclass variational autoencoder[END_REF] posed deepfake detection as an anomaly detection problem and used variational autoencoder for detecting deepfakes. Montserra et al. proposed a network that exploits the advantages of both, convolutional, as well as recurrent network to classify the integrity of a video. Hernandez-Ortega [START_REF] Hernandez-Ortega | Deepfakeson-phys: Deepfakes detection based on heart rate estimation[END_REF] proposed a deepfake detection framework based on physiological measurement, namely heart rate using remote photoplethysmography (rPPG). Trinh et al. [START_REF] Trinh | Interpretable and trustworthy deepfake detection via dynamic prototypes[END_REF] utilized dynamic representations (i.e., prototypes) to explain deepfake temporal artifacts. Sun et al. [START_REF] Sun | Domain general face forgery detection by learning to weight[END_REF] attempted to generalize forgery face detection by proposing a framework based on meta-learning.

Rössler et al. [START_REF] Rössler | Faceforensics++: Learning to detect manipulated facial images[END_REF] presented a comparison of existing handcrafted, as well as deep neural networks (DNNs), which analyzed the FaceForensics++ dataset and proceeded to detect adversarial examples in an image-based manner.

III. B : E A M

In this section, we review attention mechanisms deemed relevant for deepfake detection. Attention mechanisms are generally designed to identify and focus on salient information to capture fine-grained information. Deepfake videos being accurate, possess subtle changes with respect to real videos. Therefore, attention mechanisms are instrumental in facilitating improved classification accuracy of a deepfake detector by enabling the model to focus on discriminative information. Firstly, we discuss attentional layers placed on top of convolutional networks. We begin by assuming that a video clip ∈ R 3× × is sampled from the original video. a) Squeeze and Excitation block: The Squeeze and Excitation (SE) block [START_REF] Hu | Squeeze-and-excitation networks[END_REF] boosts the representational power of a CNN by modelling inter-dependencies between channels of the features learnt by it. The SE block comprises of two operators: squeeze and excitation. While the squeeze operation aggregates features across spatial dimensions and creates a global distribution of channel-level feature response, the excitation operation is a self-gating mechanism that generates a vector of per-channel re-calibration weights. We proceed to define both operations.

Squeeze Operation Let us assume a feature from a set of convolutional blocks

∈ × × is represented as =[ 1 , 2 , .... ]
, where ∈ × . The squeeze operation exploits global spatial information by squeezing through global average pooling and creating a channel descriptor, ∈ where ℎ element of is calculated as

= ( ) = 1 × =1 =1 ( , ). (1)
Excitation Operation exploits information acquired through squeeze operation to model dependency among channels through gating with sigmoid activation. Formally, squeeze operation is defined the following.

= ( , 1 , 2 ) = ( 2 ( 1 )), (2)
where 1 ∈ × , 2 ∈ × . In this context denotes the modulation weights per channel and denotes ReLU. The recalibrated feature is then computed as

˜ = ( , ) = ˜ = [ ˜ 1 , ˜ 2 , .... ˜ ]. (3)
b) Self-attention Block: In contrast to Squeeze-Excitation operation, self-attention block is characterized by computing the response at a position as a weighted sum of features at all positions in the input feature maps. The learning mechanism of attention weights for a space-time volume allow for modelling of long-term relationships.

Self-attention enables CNNs to capture long-range dependencies by activating relevant space-time pixels in the latent space through its own embeddings. Formally, in the context of CNNs, a self-attention operation in this scenario implemented via non-local block [START_REF] Wang | Non-local neural networks[END_REF] is defined as

= 1 ( ) ∀ ( , ) ( ), (4)
where and denote the input and output features, respectively. represents a pairwise function that computes a relationship (e.g., affinity) between pixels and . signifies a unary function, which computes a representation of input feature at pixel . ( ) is a normalization factor and is set as ( ) = ∀ ( , ).

In this chapter, the default choices of and are used. is a linear embedding and is defined as ( ) = . Pairwise function is defined as

( , ) = ( ) ( ) , (5)
where ( ) = and ( ) = are the associated embeddings. This pairwise function is called embedded Gaussian and primarily computes dot-product similarity in the embedding space.

c) Visual Transformer:: Self-attention mechanisms aimed at learning attention weights for a convolutional feature map are now being replaced with fully attentional networks. Therefore, we discuss and explore vision transformer [START_REF] Dosovitskiy | An image is worth 16x16 words: Transformers for image recognition at scale[END_REF], [START_REF] Tolstikhin | Mlp-mixer: An all-mlp architecture for vision[END_REF], [START_REF] Steiner | How to train your vit? data, augmentation, and regularization in vision transformers[END_REF] in our context. Deviating from former two attention mechanisms, we here aim at exploiting the texture of deepfake videos through vision transformers. We are particularly interested in video transformers, and thus focus on a state-of-the-art method, namely TimeSformer [START_REF] Bertasius | Is space-time attention all you need for video understanding?[END_REF], which inputs patches (described as tokens) from a video clip. The patches of dimension × which are sub-parts of images are stacked across space and time. These patches while mapping into vectors are fed to a linear embedding to encode them into tokens. Then, these tokens are processed with selfattentional operations by projecting each of them into Keys ( ∈ R D ), Queries ( ∈ R D ), and Values ( ∈ R D ). Finally, the modulated feature vector F is obtained by

= ( × √ ) × . ( 6
)
This recombination of tokens in indicates highlighting the pertinent tokens within a frame (for spatial attention), highlighting the pertinent temporal frame within a video clip (for temporal attention), and both (for spatio-temporal attention). The type of attention is implemented by invoking the above operation across the desired dimension. In our experiments, we explore both, joint spatio-temporal attention and dissociated spatial and temporal attention for detecting deepfakes. Note that dissociated spatial and temporal attention is implemented by applying temporal and then spatial attention, respectively.

IV. D

The FaceForensics++ dataset [START_REF] Rössler | Faceforensics++: Learning to detect manipulated facial images[END_REF] comprises of 1000 talking subjects, represented in 1000 real videos. Further, based on these 1000 real videos, 4×1000 adversarial examples have been generated by following four manipulation schemes.

1) Face-swap represents a graphic approach transferring a full face region from a source video to a target video. Using facial landmarks, a 3D template model employs blend-shapes to fit the transferred face. FaceSwap . 2) Deepfakes has become the synonym for all face manipulations of all kind, it origins to FakeApp and faceswap github . 3) Face2face [START_REF] Thies | Face2face: Real-time face capture and reenactment of rgb videos[END_REF] is a facial reenactment system that transfers the expressions of a source video to a target video, while maintaining the identity of the target person. Based on an identity reconstruction, the whole video is being tracked to compute per frame the expression, rigid pose, and lighting parameters. 4) Neuraltextures [START_REF] Thies | Deferred neural rendering: Image synthesis using neural textures[END_REF] incorporates facial reenactment as an example for a NeuralTextures-based rendering approach. It uses the original video data to learn a neural texture of the target person, including a rendering network that has been trained with a photometric reconstruction loss in combination with an adversarial loss. Only the facial expression corresponding to the mouth region is being modified, i.e., the eye region stays unchanged.

V. E

We select one state of the art 3D CNN method, namely 3D ResNet [START_REF] Hara | Can spatiotemporal 3D CNNs retrace the history of 2D CNNs and imagenet?[END_REF] as base network, which has excelled in action recognition. After each ResNet block we include above mentioned attention, in order to perform our experiments. The networks have been pre-trained on the large-scale human action dataset Kinetics-400 [START_REF] Kay | The kinetics human action video dataset[END_REF]. We inherit the weights in the neural network models and further fine-tune the networks on the FaceForensics++ dataset in all our experiments. We detect and crop the face region based on facial landmarks, which we detect in each frame using the method from Bulat and Tzimiropoulos [START_REF] Bulat | How far are we from solving the 2D & 3D face alignment problem? (and a dataset of 230,000 3D facial landmarks)[END_REF]. Next, we enlarge the detected region by a factor of 1.3, in order to include pixels around the face region.

We conduct experiments on the manipulation techniques listed above: (a) all manipulation techniques, (b) each manipulation technique separately, as well as (c) crossmanipulation techniques. Towards this, we split train, test and validation sets according to the protocol provided in the FaceForensics++ dataset.

A. Implementation details

We use PyTorch to implement our models. The three entire networks are trained end-to-end on 4 NVIDIA V100 GPUs. We set the learning rates to 1 -3 . The size of input for 3D ResNet are 16 frames of spatial resolution 112 × 112. For testing, we split each video into short trunks, each of temporal size of 250 frames. The final score assigned to each test video is the average value of the scores of all trunks. For training TimeSformer, we use clips of size 8×3×224×224, with frames sampled at a rate of 1/32. The patch size is 16 × 16 pixels. During inference, we sample a single temporal clip in the middle of the video. We use 3 spatial crops (topleft, center, bottom-right) from the temporal clip and obtain the final prediction by averaging the scores for these 3 crops. We note that the difference in the training/testing mechanism for 3D ResNet and TimeSformer but this is owing to their configuration for achieving the best performance. We report in all experiments the true classification rates (TCR).

B. All Manipulations Experiments

We evaluate the performance of 3D ResNet with or without attention, and also the recently popular visual transformers for the task of deepfake detection. One of the challenges in deepfake detection is that the dataset is unbalanced i.e. the number of fake videos being nearly four times the number of real videos. To handle this issue, we use weighted cross-entropy loss to negate the biased scenario. The results are provided in Table I. We compare the results with image-forgery detection algorithms and the stateof-the-art such as XceptionNet [START_REF] Rössler | Faceforensics++: Learning to detect manipulated facial images[END_REF], learning-based methods used in the forensic community for generic manipulation detection [START_REF] Cozzolino | Recasting residual-based local descriptors as convolutional neural networks: an application to image forgery detection[END_REF], [START_REF] Bayar | A deep learning approach to universal image manipulation detection using a new convolutional layer[END_REF], computer-generated vs. natural image detection [START_REF] Rahmouni | Distinguishing computer graphics from natural images using convolution neural networks[END_REF] and face tampering detection [START_REF] Afchar | Mesonet: a compact facial video forgery detection network[END_REF].

After observing the experimental results, we conclude that the video-based algorithms perform similar to the imagebased algorithm XceptionNet. This may be due to the smaller size of the training data. We employ different attention mechanism on 3D ResNet discussed in section III. We employ, SE based attention, non-local block on top of 3D convolutional network and finally also TimeSformer (a transformer type network). Further, we note that non-local attentional layers when placed on top of each block of 3D ResNet, outperform the pre-trained 3D ResNet, Transformer and the 3D ResNet with SE attention. We also note that Kinetics-based pretraining significantly boosts the detection performance.

We note that tampering of videos in the FaceForensics++ dataset is done either by replacing the largest facial region in the target image and advanced blending and color correction algorithms, or by learning-based manipulation models. Hence, seamlessly superimposing source onto target videos poses an inherent dissimilarity. Hence, capturing long-range dependencies as in the proposed non-local combination is highly beneficial in video processing for this scenario rather than previous settings proposed in [START_REF] Wang | Non-local neural networks[END_REF]. However, it should be considered that the proposed setting is computationally expensive, as attention is employed at the lower layers, where the feature size is larger.

C. Single Manipulation Experiments

In this section, we investigate the performances of all baselines when trained and tested on single manipulation techniques. We report the TCRs in Table IV. The pattern of the results found to be very similar to the above discussed, where training and testing was performed on all manipulation techniques. Our results suggest that the most challenging manipulation approach is the GAN-based neuraltextures-approach. It is to be noted that neuraltextures trains a unique model for each video, which results in a higher variation of possible artifacts, which can be reason for the low detection rates. We note that attention is beneficial also in this setting. In particular, while applying non-local based attention after each 3D ResNet block accounts for nearly 5% better detection rates. While deepfakes similarly train one model per video, a fixed postprocessing pipeline is used, which is similar to the computerbased manipulation methods and thus has consistent artifacts that can be instrumental for deepfake detection.

We perform ablation studies, in order (i) to determine the optimal position of the non-local block, and (ii) for the best employment of TimeSformer attention for the problem in hand, which is summarised in Table II and Table III, respectively. It can be concluded from Table II that in deepfake scenarios non-local block when employed as in the original paper [START_REF] Wang | Non-local neural networks[END_REF] (i.e. 4 non-local blocks after the last ResNet block) under-performs compared to other presented configurations. We note that employing a single non-local block after each ResNet block outperforms all other representative baselines. Results of our ablation study, showing the importance of utilizing pre-trained weight is presented is Table V.

We proceed to tackle the question of handling space and time with respect to attention for deep fake. In SE a dissociated approach is followed, as squeeze aggregates features across spatial dimensions and creates a global distribution of channel-level feature response, the excitation operation is a self-gating mechanism that generates a vector of per-channel re-calibration weights. In Non-local with our setting, it is clear that the non-local blocks can capture long range spatialtemporal features, when trained jointly. For the experiments on TimeSformer based on joint and dissociated learning, we find that joint learning outperforms all scenarios except for neuraltextures, which is the most challenging. Therefore, it is clear that joint spatial-temporal attention mechanism is most effective in detecting deepfakes.

D. Cross-manipulation experiments

In our third set of experiments, we train our baselines and attention-empowered models with videos manipulated by 3 techniques, as well as with original videos and proceed to test on the remaining manipulation technique and original videos. We present related results in Table VI. We note that crossmanipulation constitutes the most challenging experiment setting. At the same time it is the scenario, which we can expect to encounter in practice, as it is unlikely that we will have knowledge of a possible manipulated technique.

For the detection algorithms, one of the more challenging settings in this experiment is when faceswap is the manipulation technique to be detected. We note that 3D ResNet with non-local block outperforms all other networks in this setting. Among all manipulation techniques, face2face and faceswap represent graphics-based approaches, whereas deepfakes and neuraltextures are learning-based approaches. We have that in faceswap the full facial region in the target image is replaced by the source face image and involves advanced blending and color correction to accurately superimpose source onto target. Hence in this context the challenge is due to the inherent dissimilarity of faceswap and the other manipulation techniques.

We note that humans can easily detect manipulations affected by faceswap and deepfakes and were more challenged by face2face and ultimately by neuraltextures [START_REF] Rössler | Faceforensics++: Learning to detect manipulated facial images[END_REF]. This is also reflected in the performance of 3D ResNet with nonlocal block, which is mostly challenged by videos manipulated by neuraltextures. However, we have that in most scenarios, employment of attention mechanism is effective.

VI. C

In this work, we study attention mechanisms in the context of deepfake detection. Our results suggest that the incorporation of attention mechanisms improves the detection accuracy of deepfakes by placing the focus on artefacts in forged videos. We note that attention capturing long-term dependencies, namely self-attention via non-local blocks is best in our setting, when utilized in our proposed configuration. We conduct experiments in a cross-manipulation scenario, which remains the most challenging detection scenario with respect to detection rates. Specifically, reduced detection rates are more prominent for learned manipulation techniques such as neuraltextures, when not included in the training set. This suggests that current deepfake detection approaches lack in adapting to a distribution different from the training distribution, hence posses low generalization capabilities. While attention mechanism reduce the gap to some extent, generalizable deepfake detection remains an open challenge. Future work will involve blending different attention mechanisms to obtain more robust representation for deepfake detection. R

Fig. 1 .

 1 Fig. 1. A sample frame from the FaceForensics++. From left to right: original source and target (small) images, deepfakes, face2face, faceswap, neuraltextures.

https://github.com/MarekKowalski/FaceSwap/ https://www.fakeapp.com https://github.com/deepfakes/faceswap


MD, MSc; Joseph Benzakoun
email: benzakoun.joseph@gmail.com

MSc Marc-Antoine Deslys

MD, MSc Laurence Legrand

MD Ghazi Hmeydia

MD Guillaume Turc

PhD ; Wagih

MD, MSc Ben Hassen

PhD Sylvain Charron

PhD; Clément Debacker

MD Olivier Naggara

PhD; Jean-Claude Baron

MD, ScD; Bertrand Thirion

PhD Catherine Oppenheim

Synthetic FLAIR as a substitute for FLAIR sequence in acute ischemic stroke

Keywords:

Synthetic fluid-attenuated inversion recovery (FLAIR) generated with deep learning is as

accurate as a real FLAIR sequence for the identification of early stroke.

Introduction

Time of symptom onset is unknown in up to 27% of patients with acute ischemic stroke (AIS) [START_REF] Fink | The Stroke Patient Who Woke Up[END_REF], especially in the setting of wake-up stroke. Yet, knowledge of estimated time elapsed since stroke onset is part of current recommendations for reperfusion therapies [START_REF] Powers | Guidelines for the Early Management of Patients With Acute Ischemic Stroke: 2019 Update to the 2018 Guidelines for the Early Management of Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association[END_REF]. MRI plays an important role in estimating time since stroke onset: the presence of an acute ischemic lesion on diffusion-weighted imaging (DWI) in the absence of a hyperintense lesion on fluid-attenuated inversion recovery (FLAIR), DWI-FLAIR mismatch, indicates a short (≤4.5h) onset-to-MRI delay [START_REF] Thomalla | DWI-FLAIR mismatch for the identification of patients with acute ischaemic stroke within 4•5 h of symptom onset (PRE-FLAIR): a multicentre observational study[END_REF][START_REF] Aoki | FLAIR can estimate the onset time in acute ischemic stroke patients[END_REF][START_REF] Petkova | MR imaging helps predict time from symptom onset in patients with acute Page 17 of 48 10[END_REF]. The WAKE-UP stroke trial showed that in patients with AIS, unknown time of symptom onset and DWI-FLAIR mismatch, intravenous thrombolysis resulted in a better functional outcome than placebo [START_REF] Thomalla | MRI-Guided Thrombolysis for Stroke with Unknown Time of Onset[END_REF]. DWI-FLAIR mismatch may also help in selecting patients with unknown time of AIS onset for mechanical thrombectomy [START_REF] Escalard | Endovascular Treatment in Ischemic Stroke) Research Investigators. Unknown-onset strokes with anterior circulation occlusion treated by thrombectomy after DWI-FLAIR mismatch selection[END_REF].

FLAIR is also used to rule out subacute AIS [START_REF] Tisserand | Prevalence of MRI-defined recent silent ischemia and associated bleeding risk with thrombolysis[END_REF] and stroke mimics, and for evaluating the extent of white matter hyperintensities (WMHs) [START_REF] Boulouis | White matter hyperintensity burden in patients with ischemic stroke treated with thrombectomy[END_REF]. A FLAIR sequence is therefore part of most stroke MR protocols (10), regardless of whether AIS onset time is known.

Because time is of the essence in the management of AIS, short imaging baseline protocols are needed to allow for prompt treatment decisions [START_REF] Saver | Time is brain--quantified[END_REF]. FLAIR sequence acquisition as part of an AIS MR protocol usually requires several minutes, and image quality may be suboptimal in restless patients [START_REF] Benzakoun | Can a 15-sec FLAIR replace conventional FLAIR sequence in stroke MR protocols?[END_REF]. To overcome these limitations, attempts have been made to use the T2-weighted echo-planar imaging (EPI) sequence before the application of diffusion gradients (b=0 sec/mm 2 [b0]) as substitute for FLAIR [START_REF] Geraldo | Does b1000-b0 Mismatch Challenge Diffusion-Weighted Imaging-Fluid Attenuated Inversion Recovery Mismatch in Stroke?[END_REF]. The resulting b0-DWI mismatch allowed estimation of AIS onset with a moderate sensitivity (72.9%), in part because analysis of cortical regions was hindered by high signal intensity from cerebrospinal fluid on the b0 images.

Based on the assumption that key T2-signal changes were embedded in the b0 and b=1000 s/mm 2 (b1000) weightings, we hypothesized that synthetic FLAIR images generated solely based on DWI using deep learning methods could compete with real FLAIR images for DWI-FLAIR mismatch determination. Such an approach may allow to omit FLAIR acquisition and thus reduce scan time in the acute stroke setting.

The purpose of our study was therefore to compare deep learning-derived synthetic FLAIR to real FLAIR images for presence of DWI-FLAIR mismatch and identification of patients with AIS imaged ≤4.5h of stroke onset.

Material and Methods

In accordance with French legislation, a commitment to compliance was filed under the reference MR4708101219. Patients were informed and offered the possibility to be excluded from data analysis. As this study implied retrospective analysis of anonymized data collected as part of routine care, approval by an Ethics Committee was not required and written informed consent was not requested as per MR-004 national regulation. Various parts of the population studied here have been published in 25 original manuscripts; however, synthetic FLAIR was not evaluated in any of these studies (Online Appendix). Data generated or analyzed during the study are available from the corresponding author by request.

Patients

We retrospectively included consecutive AIS patients admitted to our hospital between January 2002 and May 2019. The patients were identified from a prospectively collected stroke registry of consecutive patients. Patient were included in this study if they had undergone acute stroke MRI before treatment and received reperfusion treatment, regardless of whether stroke onset time was known or not. Patients who refused to participate to the study were excluded. In this center, MRI has been used as a first-line diagnostic tool for acute AIS during this period [START_REF]Accident vasculaire cérébral : prise en charge précoce (alerte, phase préhospitalière, phase hospitalière initiale, indications de la thrombolyse)[END_REF]. All baseline and early MRI follow-up examinations performed within 48 hours of hospital admission were included in the analysis and are thereafter termed MRI datasets. MRI datasets with missing DWI or FLAIR images were excluded. Age, sex, National Institutes of Health Stroke Scale score at admission, stroke onset-to-MRI delay, and recanalization treatment were collected.

MRI acquisition and parameters

MRI scans were acquired with a 1.5-T MRI scanner (Signa EchoSpeed; GE Healthcare) with a 33 mT/m gradient and an eight-channel coil, with similar parameters during the entire study period. DWI parameters were 128×128 matrix, 24-cm field of view, 6-mm slice thickness, repetition time 6400-6700 msec, echo time 90 msec, diffusion weightings: b=0 and b=1000 sec/mm 2 , gradients applied in three orthogonal directions. ADC maps were computed based on DWI acquisition. FLAIR parameters were 256×192 matrix, 24-cm field-of-view, TR 8000-10000 msec, inversion time 2000-2300 msec. Sequence duration was 53 seconds for DWI and between 1 minute and 40 seconds (after 2018) and 2 minutes and 15 seconds (before 2018) for FLAIR (termed real FLAIR). Total protocol duration including time of flight angiography and T2-gradient-echo imaging was < 7 minutes.

Data preprocessing

Sequences were exported from the Picture Archiving and Communication System (PACS) and upscaled to a 256×256 matrix. Real FLAIR images were coregistered onto the corresponding DWI sequences using FSL FLIRT (version 6.0, Functional Magnetic Resonance Imaging of the Brain, Oxford, UK, non-commercial software) [START_REF] Jenkinson | A global optimisation method for robust affine registration of brain images[END_REF] with 12-parameters affine registration.

The dataset was split into training and test sets (80/20%), with stratification regarding MRI time-point (baseline or early follow-up). MRI quality was evaluated by an independent reader (MAD, MSc, 3-months training in stroke imaging) on an ordinal scale ranging from 1 (low quality) to 3 (high quality).

Deep-learning model

The deep-learning model was derived from Ea-GAN [START_REF] Yu | Ea-GANs: Edge-Aware Generative Adversarial Networks for Cross-Modality MR Image Synthesis[END_REF] (see Supplemental Material). The model was trained on the training set using source DWI, ADC, and real FLAIR. After training was complete, synthetic FLAIR images were generated in the test set using source DWI and ADC maps but not real FLAIR images. Information for model architecture and training as well as an illustration of the network are provided in Supplemental Material and Supplemental Figure 1. Source code and model weights will be made freely available at https://github.com/NeuroSainteAnne/synthFLAIR. Total time for synthetic FLAIR calculation in the test set was measured on a production environment, and MR time reduction estimated in Supplemental Figure 2.

Data analysis in the test set

DWI (b1000) and ADC maps were displayed beside real FLAIR or synthetic FLAIR images, presented in random order. Four neuroradiologists (GH, JB, LL, CO with 3, 5, 10, 20 years of experience in stroke imaging, respectively), trained to the Wake-Up Radiology Trainer set [START_REF] Galinovic | Visual and region of interest-based inter-rater agreement in the assessment of the diffusion-weighted imaging-fluid-attenuated inversion recovery mismatch[END_REF] and blinded to FLAIR sequence type and onset-to-MRI delay, compared DWI and FLAIR images and determined whether an ischemic lesion was visible on FLAIR images. Each reader evaluated both synthetic FLAIR and real FLAIR images of assigned MRI datasets in separate sessions, with a two-month wash-out period between sessions to avoid recall bias. FLAIR lesion visibility was categorized as "Negative FLAIR" (i.e., presence of DWI-FLAIR mismatch), "Positive FLAIR" (i.e., absence of DWI-FLAIR mismatch), or "Non assessable", as per Wake-Up Stroke trial specifications [START_REF] Thomalla | A multicenter, randomized, double-blind, placebo-controlled trial to test efficacy and safety of magnetic resonance imaging-based thrombolysis in wake-up stroke (WAKE-UP)[END_REF]. The test dataset was split into 4 subsets. Each of the four readers were assigned 2 of these 4 subsets (Supplemental Figure 3); as a result, each MRI set was evaluated by two readers for inter-observer reproducibility assessment. Two months later, 2 readers each re-evaluated 1 data subset for intra-observer reproducibility assessment. Between-reader discrepancies were resolved by consensus. The visual analysis was complemented by a quantitative analysis of FLAIR signal changes. The relative signal intensity (rSI) of the ischemic lesion to the mirror lesion's signal intensity in the contralateral hemisphere was calculated on real and synthetic FLAIR data (Supplemental Material) as described previously [START_REF] Petkova | MR imaging helps predict time from symptom onset in patients with acute Page 17 of 48 10[END_REF]. Finally, a single neuroradiologist (JB) evaluated WMHs according to the modified Fazekas scale [START_REF] Pantoni | Impact of age-related cerebral white matter changes on the transition to disability -the LADIS study: rationale, design and methodology[END_REF] on real FLAIR and synthetic FLAIR images, for the whole test set.

Statistical analysis

Statistical analysis was conducted with R (version 4.0.1, R Foundation, Vienna, Austria, opensource). Values are expressed as median (Interquartile range) and/or 95% CIs. Intra-observer reproducibility, inter-observer reproducibility, and concordance between real FLAIR and synthetic FLAIR for DWI-FLAIR mismatch were evaluated with Cohen Kappa coefficient.

Sensitivity, specificity, positive predictive value, and negative predictive value of DWI-FLAIR mismatch for the identification of AIS≤4.5h were compared between real FLAIR and synthetic FLAIR using McNemar test, and relative predictive values method using DTComPair module [START_REF] Stock | DTComPair: Comparison of binary diagnostic tests in a paired study design[END_REF]. Pre-specified subgroup analyses were conducted on low-quality (score≤2) real FLAIR, and in patients imaged within 12h to focus the analysis on early MRI scans.

Adjudication times and rSI were compared with Wilcoxon paired test. Concordance between real FLAIR and synthetic FLAIR for Fazekas scores was evaluated with weighted . Correlation coefficient of rSI measured on real and synthetic FLAIR was calculated using Pearson coefficient. Area under the ROC curve for the identification of AIS≤4.5h using rSI were computed and compared using DeLong's method. Statistical threshold for significance was P = .05.

Results

Patients

During the screening period, 1416 MRI datasets from 821 patients (446 women, 375 men, median age: 71y [IQR, 57-81]) were available (Figure 1), of which 1134 (80%) were used for training and 282 (20%) for evaluation (test set). Clinical data are summarized in Table 1. In the test set, a lesion was seen on DWI in 280 of 282 (99%) MRI datasets.

Synthetic FLAIR generation and adjudication time

Median duration for synthetic FLAIR image generation was 2.5 seconds (IQR, 1.7-3.4).

Median total duration for 24-slice DWI transfer onto the server, data conversion, synthetic FLAIR generation and transmission to PACS was 22.3 seconds (IQR, 17.9-25.0). Adjudication time for DWI-FLAIR mismatch assessment was similar between real FLAIR and synthetic FLAIR (median time: 13 seconds [IQR, 7-24] and 13 seconds [IQR, [START_REF] Tisserand | Prevalence of MRI-defined recent silent ischemia and associated bleeding risk with thrombolysis[END_REF][START_REF] Boulouis | White matter hyperintensity burden in patients with ischemic stroke treated with thrombectomy[END_REF][10][START_REF] Saver | Time is brain--quantified[END_REF][START_REF] Benzakoun | Can a 15-sec FLAIR replace conventional FLAIR sequence in stroke MR protocols?[END_REF][START_REF] Geraldo | Does b1000-b0 Mismatch Challenge Diffusion-Weighted Imaging-Fluid Attenuated Inversion Recovery Mismatch in Stroke?[END_REF][START_REF]Accident vasculaire cérébral : prise en charge précoce (alerte, phase préhospitalière, phase hospitalière initiale, indications de la thrombolyse)[END_REF][START_REF] Jenkinson | A global optimisation method for robust affine registration of brain images[END_REF][START_REF] Yu | Ea-GANs: Edge-Aware Generative Adversarial Networks for Cross-Modality MR Image Synthesis[END_REF][START_REF] Galinovic | Visual and region of interest-based inter-rater agreement in the assessment of the diffusion-weighted imaging-fluid-attenuated inversion recovery mismatch[END_REF][START_REF] Thomalla | A multicenter, randomized, double-blind, placebo-controlled trial to test efficacy and safety of magnetic resonance imaging-based thrombolysis in wake-up stroke (WAKE-UP)[END_REF][START_REF] Pantoni | Impact of age-related cerebral white matter changes on the transition to disability -the LADIS study: rationale, design and methodology[END_REF][START_REF] Stock | DTComPair: Comparison of binary diagnostic tests in a paired study design[END_REF][START_REF] Goyal | Randomized Assessment of Rapid Endovascular Treatment of Ischemic Stroke[END_REF][START_REF] Menon | Analysis of Workflow and Time to Treatment on Thrombectomy Outcome in the Endovascular Treatment for Small Core and Proximal Occlusion Ischemic Stroke (ESCAPE) Randomized, Controlled Trial[END_REF][START_REF] Provost | Magnetic Resonance Imaging or Computed Tomography Before Treatment in Acute Ischemic Stroke[END_REF][START_REF] Meinel | Association of initial imaging modality and futile recanalization after thrombectomy[END_REF][START_REF] Nael | Six-Minute Magnetic Resonance Imaging protocol for evaluation of acute ischemic stroke: pushing the boundaries[END_REF][START_REF] Skare | A 1minute full brain MR exam using a multicontrast EPI sequence[END_REF], respectively; P=.55).

Intra-and inter-observer reproducibility for FLAIR lesion visibility

Intra-observer reproducibility was almost perfect both for real FLAIR (=0.85 [95%CI: 0.76-0.93], range 0.84-0.86 per reader) and synthetic FLAIR (=0.85 [95%CI: 0.76-0.93], range 0.83-0.86 per reader). Inter-observer reproducibility was substantial (=0.80 [0.74-0.87] and =0.80 [95%CI: 0.74-0.87], respectively).

Concordance between real FLAIR and synthetic FLAIR

Intra-observer concordance is summarized for each reader in

Identification of AIS with a time since onset ≤4.5hr with quantitative analysis

In 239 MRI datasets with known onset-to-MRI delay, median rSI was 1.15 (IQR, 1.07-1.33) and 1.13 (IQR, 1.06-1.28) for real FLAIR and synthetic FLAIR, respectively (P=0.15). rSI values measured on real FLAIR and synthetic FLAIR were positively correlated (r=0.75 [95%CI: 0.69-0.80]). Area under the ROC curve for identification of AIS with a time since onset ≤4.5hr were not significantly different between real and synth FLAIR (0.87 [95%CI: 0.82-0.91] vs. 0.88 [95%CI: 0.83-0.92] respectively, P=.80) (Figure 3).

Discussion

Benefits of recanalization are highly time-dependent in AIS [START_REF] Saver | Time is brain--quantified[END_REF][START_REF] Goyal | Randomized Assessment of Rapid Endovascular Treatment of Ischemic Stroke[END_REF][START_REF] Menon | Analysis of Workflow and Time to Treatment on Thrombectomy Outcome in the Endovascular Treatment for Small Core and Proximal Occlusion Ischemic Stroke (ESCAPE) Randomized, Controlled Trial[END_REF], thus minimizing the time for each step of the imaging workflow before treatment is crucial [START_REF] Provost | Magnetic Resonance Imaging or Computed Tomography Before Treatment in Acute Ischemic Stroke[END_REF][START_REF] Meinel | Association of initial imaging modality and futile recanalization after thrombectomy[END_REF]. We showed that synthetic FLAIR, generated solely from DWI, was highly consistent with real FLAIR for the evaluation of DWI-FLAIR mismatch, with results as accurate as real FLAIR for identifying AIS<4.5h after onset. This suggests that synthetic FLAIR may replace real FLAIR for that purpose in AIS.

MRI-based selection for AIS patients can be accomplished within a timeframe similar

to CT-based selection without delaying treatment [START_REF] Provost | Magnetic Resonance Imaging or Computed Tomography Before Treatment in Acute Ischemic Stroke[END_REF] and is associated with more favorable functional outcome and less mortality after mechanical thrombectomy [START_REF] Meinel | Association of initial imaging modality and futile recanalization after thrombectomy[END_REF]. However, MRI scan duration is currently longer than CT and efforts are needed to shorten MR duration [START_REF] Provost | Magnetic Resonance Imaging or Computed Tomography Before Treatment in Acute Ischemic Stroke[END_REF][START_REF] Meinel | Association of initial imaging modality and futile recanalization after thrombectomy[END_REF]. To do so, multiple approaches have been proposed: using EPI-based sequences for T2 gradient-echo and FLAIR [START_REF] Benzakoun | Can a 15-sec FLAIR replace conventional FLAIR sequence in stroke MR protocols?[END_REF][START_REF] Nael | Six-Minute Magnetic Resonance Imaging protocol for evaluation of acute ischemic stroke: pushing the boundaries[END_REF], applying multiband imaging [START_REF] Skare | A 1minute full brain MR exam using a multicontrast EPI sequence[END_REF], or quantitative MR imaging methods such as synthetic MRI [START_REF] Tanenbaum | Synthetic MRI Page 21 of 48[END_REF]. The latter approach produces parametric maps from which various MR contrasts, including FLAIR, can be calculated. However, synthetic MRI does not currently provide FLAIR images free of hyperintense artifacts [START_REF] Ryu | Initial clinical experience of synthetic MRI as a routine neuroimaging protocol in daily practice: A single-center study[END_REF], and EPI-based FLAIR cannot replace real FLAIR for stroke-to-MRI delay estimation because of lower accuracy for detecting signal changes [START_REF] Benzakoun | Can a 15-sec FLAIR replace conventional FLAIR sequence in stroke MR protocols?[END_REF]. Rather than aiming at shortening FLAIR acquisition, our approach would allow to effectively omit it. We confirmed that FLAIR signal changes in AIS are embedded in the b0 and b1000 weightings of the DWI sequence [START_REF] Geraldo | Does b1000-b0 Mismatch Challenge Diffusion-Weighted Imaging-Fluid Attenuated Inversion Recovery Mismatch in Stroke?[END_REF], allowing generation of synthetic FLAIR images that contain key information for identification of AIS with a time since onset ≤4.5hr, either visually using the DWI-FLAIR mismatch or quantitatively using the rSI. Moreover, synthetic FLAIR mimicked real FLAIR images, with equal labelling time, suggesting the absence of a learning curve.

Synthetic FLAIR has several advantages. First, it allows a ≈25% reduction in scanning time if real FLAIR acquisition is removed from MR protocol, with synthetic FLAIR being computed during the acquisition of the remaining sequences. Although it does not obviate the need to optimize each step of the workflow to minimize door-to-needle time, saving 1.66 min could theoretically avoid the loss of up to 3.1 million neurons [START_REF] Saver | Time is brain--quantified[END_REF]. Second, synthetic FLAIR should allow motion artifact reduction in restless patients with approximately 10% not assessable FLAIR images based on previous studies [START_REF] Thomalla | Negative fluid-attenuated inversion recovery imaging identifies acute ischemic stroke at 3 hours or less[END_REF]. Each DWI image is acquired in <1 second, thus theoretically "freezing" head movements and minimizing severe artifacts. Synthetic FLAIR may also avoid repeated FLAIR acquisitions when there are severe motion artifacts in restless patients. Third, synthetic FLAIR is available once DWI is acquired, which is crucial whenever the MR is prematurely interrupted in restless patients with unknown stroke onset time. Fourth, synthetic FLAIR is directly comparable with DWI images, without the need for coregistration. Lastly, it allows an accurate evaluation of WMHs, which are considered a risk factor for post-thrombolysis hemorrhage [START_REF] Lin | Increased risk of post-thrombolysis intracranial hemorrhage in acute ischemic stroke patients with leukoaraiosis: a meta-analysis[END_REF] and for post-mechanical thrombectomy unfavorable outcome [START_REF] Boulouis | White matter hyperintensity burden in patients with ischemic stroke treated with thrombectomy[END_REF].

Our study has limitations. First, synthetic FLAIR was developed and tested on MRI scans from a single scanner with minimal variations in imaging parameters, and our findings cannot be directly inferred to other MR scanners. In any deep-learning application to medical imaging, using a single source of information increases between-subject homogeneity and facilitates the learning process, even though it reduces generalizability. For further validation and to satisfy the Checklist for Artificial Intelligence in Medical Imaging, the algorithm needs validation on external data [START_REF] Mongan | Checklist for Artificial Intelligence in Medical Imaging (CLAIM): A Guide for Authors and Reviewers[END_REF] with paired DWI and FLAIR image sets, ideally from different MR units and manufacturers. To this end, fine-tuning the freelyavailable learned model onto any new MR unit will likely be necessary [START_REF] Tajbakhsh | Convolutional Neural Networks for Medical Image Analysis: Full Training or Fine Tuning[END_REF]. Unsupervised domain adaptation techniques may be an alternative approach allowing to implement our model onto a new image domain without the need for paired sets [START_REF] Novosad | Unsupervised domain adaptation for the automated segmentation of neuroanatomy in MRI: a deep learning approach[END_REF]. Second, patients imaged in the intermediate known onset time window (i.e., 4.5-12h) were underrepresented (namely, 10% of all patients imaged within 12h), as in previous studies [START_REF] Thomalla | Negative fluid-attenuated inversion recovery imaging identifies acute ischemic stroke at 3 hours or less[END_REF][START_REF] Emeriau | Can diffusionweighted imaging-fluid-attenuated inversion recovery mismatch (positive diffusion-weighted[END_REF]. Indeed, with respect to our retrospective study, prehospital ultrafast workflow with immediate round-the-clock access to MR was dedicated to AIS patients eligible for reperfusion therapy, namely ≤3h until 2008, and subsequently ≤4.5h for intravenous thrombolysis and ≤6h for mechanical thrombectomy. To overcome this limitation, we chose to analyze MR datasets obtained before and early (≈24h) after recanalization treatment.

Including MRI datasets with a wide range of onset-to-MRI delays was deemed necessary for the model to learn both on negative and positive FLAIR and avoid class imbalance. This naturally entails a higher sensitivity and specificity for identifying AIS with a time since onset ≤4.5hr as compared to previous studies [START_REF] Emeriau | Can diffusionweighted imaging-fluid-attenuated inversion recovery mismatch (positive diffusion-weighted[END_REF], but does not prevent comparing the two types of FLAIR images. Finally, we cannot exclude that synthetic FLAIR may be less accurate for the detection of stroke mimics (35), since we only included AIS. Given that in this study T2 signal changes unrelated to the index stroke, such as WMHs, were equally well detected by both FLAIR image subtypes, synthetic FLAIR might also help to detect T2 signal changes in stroke mimics. However, synthetic FLAIR is unlikely to be as sensitive as real FLAIR for the detection of acute subarachnoid hemorrhage, so real FLAIR or CT remain necessary whenever subarachnoid hemorrhage is suspected.

In conclusion, synthetic FLAIR may eventually replace real FLAIR sequences in the setting of AIS, allowing a clinically relevant shortening of stroke MR protocols while allowing similar diagnostic performance for DWI-FLAIR mismatch assessment. Prospective multicenter validation is needed to confirm the present findings.

Brain segmentation and weighting

To focus the learning process on the ischemic lesion and not on the normal brain tissue, three regions with different learning weights were defined:

-

Conditional architecture

Several FLAIR images presented slight motion artifacts in phase orientation, which were reproduced by the GAN in preliminary tests. To remove these artifacts from reconstruction without excluding a large data subset, we chose a conditional architecture, that included these artifacts as additional input in our Generator. A single reader (MAD, who did not participate in final evaluation of model performances) classified real FLAIR quality for all MRI datasets on an ordinal scale between 1 (low quality: important movement artifacts), 2

(moderate quality: few artifacts that did not impair interpretation) and 3 (excellent quality).

This scalar was termed as quality scalar.

Model architecture

The EA-GAN model was composed of a Generator and a Discriminator (Supplemental Figure 1).

Generator

The Generator aims at constructing synthetic FLAIR images based on four inputs:

-DWI with b=1000 s/mm 2 trace weighting -b=0 s/mm 2 weighting corresponding to the EPI sequence without diffusion gradients -ADC map -FLAIR quality as a conditional scalar (in learning mode only and set to maximum quality for synthetic FLAIR generation in the test set).

The Generator had a U-Net architecture, with a series of downward convolutions and upward convolutions linked by skip connections. The detailed architecture was:

-Five downward convolution blocks, each consisting of: The correspondence between real FLAIR and synthetic FLAIR is ensured by the loss:

o
ℒ 1 ℒ 1 = ‖𝑦 -𝐺(𝑥)‖ 1
where is the generator input, is the value of the real FLAIR image and is the image

𝑥 𝑦 𝐺(𝑥)
produced by the generator (synthetic FLAIR).

The edge-aware GAN architecture has been proposed by Yu et al. [START_REF] Yu | Ea-GANs: Edge-Aware Generative Adversarial Networks for Cross-Modality MR Image Synthesis[END_REF]. The principle consisted in adding a supplemental loss between edges of generated image and of target image in order to overweight the importance of edges definition in the learning process. This aimed at increasing fine-grain definition of the brain contours. The edges maps were computed with a Sobel filter in two dimensions, and the following loss was added to the training:

ℒ 𝐸𝑑𝑔𝑒 = ‖𝑆(𝑦) -𝑆(𝐺(𝑥,𝑞))‖ 1
where S is the Sobel filter.

Adjunction of this supplemental loss allowed to improve synthesis quality by increasing the definition of FLAIR edges in a preliminary study on 24 test subjects (which did not serve for the main analysis) as compared to the classic Pix2Pix architecture.

Discriminator

The Discriminator discriminated the synthetic FLAIR and real FLAIR into a binary decision: synthetic or real (1 or 0). It took into input the following quintuplet:

-DWI with b=1000 s/mm The optimal prediction of the Discriminator was ensured by maximizing a result of 0 when real FLAIR was given as input and 1 when synthetic FLAIR was given as input. Hence, the following Discriminator Loss was:

ℒ 𝐷 = ‖log 𝐷(𝑥,𝑦,𝑆(𝑦)) + log (1 -𝐷(𝑥,𝐺(𝑥),𝑆(𝐺(𝑥))‖ 1
where is the DWI input, the real FLAIR input, S( ) the sobel filter applied to real FLAIR 𝑥 𝑦 𝑦 and D( , ,S( )) the result of Discriminator prediction for real FLAIR evaluation.

𝑥 𝑦 𝑦

Generator Loss

The net Generator Loss was constructed with the and . An additional term was ℒ 1

ℒ 𝐸𝑑𝑔𝑒 added such as the loss decreased when the Discriminator output reached 0 when synthetic FLAIR was given as its input. Hence, the following overall Generator Loss was:

ℒ 𝐺 = ‖𝜆 1 × ℒ 1 + 𝜆 𝐸𝑑𝑔𝑒 × ℒ 𝐸𝑑𝑔𝑒 + log 𝐷(𝑥,𝐺(𝑥),𝑆(𝐺(𝑥))‖ 1
where and were two weighting constants for learning process. 𝜆 1 𝜆 𝐸𝑑𝑔𝑒

Model training

The

Radiological evaluation

In order to evaluate each MRI set twice with four neuroradiologists, the test set was split into 4 subsets (A, B, C, and D). Each neuroradiologist evaluated stroke visibility on real FLAIR and synthetic FLAIR for two subsets: reader 1 evaluated subsets A and B, reader 2 evaluated subsets B and C, reader 3 evaluated subsets C and D and reader 4 evaluated subsets A and D.

For intra-observer reproducibility, two months later, readers 1 and 2 reevaluated • Synthetic fluid-attenuated inversion recovery (FLAIR) can be generated from a diffusion-weighted imaging (DWI) sequence using deep learning within 22 seconds.

• The diagnostic performance of synthetic FLAIR to identify early (≤4.5hrs) ischemic stroke was similar to that of real FLAIR (sensitivity and specificity: 85% and 92% vs. 82% and 92%, respectively).

• Use of synthetic FLAIR instead of real FLAIR may allow a clinically relevant (≈25%) reduction in stroke MR protocol duration.

Page 49 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY

Page 12 of 48 10 E

 10 . Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY WMHs Concordance for WMH scoring between real FLAIR and synthetic FLAIR was substantial (weighted-=0.76 [95%CI: 0.70-0.81]).

  Page 16 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY imaging/negative fluid-attenuated inversion recovery) at 3 Tesla identify patients with stroke at <4.5 hours? Stroke. 2013;44(6):1647-1651. doi: 10.1161/STROKEAHA.113.001001. 35. Danière F, Edjlali-Goujon M, Mellerio C, Turc G, Naggara O, Tselikas L, Ben Hassen W, Tisserand M, Lamy C, Souillard-Scemama R, Flais S, Meder JF, Oppenheim C. MR screening of candidates for thrombolysis: How to identify stroke mimics? J Neuroradiol 2014;41(5):283-295. doi: 10.1016/j.neurad.2014.05.008. Page 23 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY Supplemental material rSI computation All ischemic lesions were segmented by a single radiologist (JB), using a combination of ADC thresholding at 620×10 -6 mm 2 /s and manual correction of the three-dimensional regions of interest (ROI) using Mango software (version 4.0.1, Research Imaging Institute, San Antonio, Texas, non-commercial software). As synthetic FLAIR values are scalars expressed between -1 and +1, a normalization procedure was performed on each synthetic FLAIR to match the mean and standard deviation of signal intensity of the corresponding real FLAIR. This normalization was done by selecting in-brain voxels outside of the DWI lesion in order to prevent cross-contamination. All DWI were then registered to the MNI152 brain atlas (Montreal Neurologic Institute, Montreal, Canada) using FSL FLIRT (version 6.0, Functional Magnetic Resonance Imaging of the Brain, Oxford, UK) and the quality of the registration was visually checked. The ROI was projected onto the MNI152 brain atlas, flipped onto the contralesional hemisphere, and then back-projected onto the original MRI acquisition referential, using a nearest-neighbor interpolation. The ADC maps were used to exclude voxels containing cerebrospinal fluid by excluding voxels with ADC values >1200×10 -6 mm 2 /s in both ROIs. The rSI was then computed by dividing the mean signal value in lesional ROI by the mean signal value in mirror ROI in both the real and synthetic FLAIR images.

  Ischemic region with high (×100) weighting -Normal brain region with normal (×1) weighting -Areas outside the brain with low (×0.01) weighting To define the ischemic region, a loose ROI was manually drawn onto b1000 sequence using Mango software (version 4.0.1, Research Imaging Institute, San Antonio, Texas, noncommercial software) by a single reader (MAD, who did not participate in final evaluation of model performances). This loose ROI was intersected with a binary mask of ADC map, thresholded to remove cerebrospinal fluid areas. To define normal brain region, the ischemic region was subtracted to a brain mask computed with Brain Extracting Tool from FSL toolbox (version 6.0, Functional Magnetic Resonance Imaging of the Brain, Oxford, UK, noncommercial software).

Figure 1 :

 1 Figures legends

Figure 2 :Figure 3 :Figure 1 :Figure 2 :Supplemental Figure 2 :

 23122 Figure 2: Comparison of DWI-FLAIR mismatch using real FLAIR and synthetic FLAIR in acute ischemic stroke.

Table 2 .

 2 After consensus, DWI-

	FLAIR mismatch was present in 133/282 (47%) and 138/282 (49%) MRI datasets with real
	FLAIR and synthetic FLAIR (Supplemental Table 1), respectively, and concordance between
	real FLAIR and synthetic FLAIR was almost perfect (=0.88 [95%CI: 0.82-0.93]). Illustrative
	examples are shown

in Figure 2. Identification of AIS with a time since onset ≤4.5hr with visual analysis

  Of the remaining 235 assessable MRI datasets, 131 were acquired within 4.5h after onset. There was no significant difference in sensitivity or specificity of DWI-FLAIR mismatch for identification of AIS≤4.5h using real FLAIR or synthetic FLAIR (107/131 [82%] vs. 111/131 [85%], P=.2; and 96/104 [92%] vs. 96/104 [92%], P>.99, respectively) (Table 3).

	True stroke onset-to-MRI delay was available in 239 of 282 test MRI datasets (84%). Of
	these, 4 pairs were excluded due to non-assessable FLAIR (2 MRI datasets with non-
	assessable real FLAIR and 2 MRI datasets with non-assessable real FLAIR and synthetic
	FLAIR). There

was again no difference in sensitivity or specificity in the subgroup imaged within 12h of onset (n=145; 131/145 [90%] imaged ≤4.5h): 107/131 [82%] vs 111/131 [85%], P=.2; and 9/14 [64%] vs 10/14 [71%], P=.3, respectively.

  MRI dataset was split between a training and a test set with an 80/20% split. Within the

	training set, 80% of the MRIs were randomly selected for training purposes and 20% were
	kept aside for validation purposes (validation set). The model was trained on the training
	subset using Adam optimizer with a learning rate at 0.00001. Training was pursued during
	3000 epochs. value was set at 100. 𝜆 1	𝜆 𝐸𝑑𝑔𝑒	value increased from 1 to 100 during the first
	100 epochs then was fixed at 100. Each 10 epochs, inference was made on the validation set

and a visual map with several synthetic FLAIR and real FLAIR slices was saved. As the interpretation of model loss was not unambiguous, all visual maps were screened by a unique reader who selected the trained model with best visual features (2500 th model) for final inference on test model. The models were developed on Tensorflow v2.0. All training sessions were done inside a JupyterLab notebook running on a python framework v3.7.3 in a Linux environment (Ubuntu 18.04 LTS). The training was done on a custom computer station with 2 TITAN RTX GPUs (with 2x24GB VRAM), on Intel i9-9900K CPU with 8 cores and 16 threads, 62 GB RAM and a 500-GB Solid State Drive.

Table 1 : Patient Characteristics in Training and Test Sets

 1

	Variable	Training Set	Test Set
	No. of MRI datasets	1134	282
	No. of MRI datasets with	973 (86)	239 (84)
	known onset-to-MRI delay
	Onset-to-MRI delay (h)*	3.3 (1.8-25.6)	3.1 (1.9-24.0)
	No. of patients	749	253
	Age (y)*	70 (57-81)	71 (58-81)
	No. of women	337 (45)	109 (43)
	NIHSS score at admission* 14 (8-20)	15 (8-20)
	Recanalization treatment
	-IVT only	474 (64)	163 (64)
	-MT only	129 (17)	35 (14)
	-IVT + MT	123 (16)	50 (20)
	-Missing data	23 (3)	5 (2)
	Note.-Data are expressed as number of patients, with percentages in parentheses. NIHSS =
	National Institutes of Health Stroke Scale, IVT = intravenous thrombolysis, MT = mechanical
	thrombectomy.
	*Data are expressed as medians with interquartile range in parentheses.

Page 29 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY respectively subsets A and B. The corresponding protocol is depicted in Supplemental Figure 2. Page 30 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY Tables Page 31 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY

Table 2 : Intra-reader Concordance between Real FLAIR and Synthetic FLAIR Labeling

 2

	Variable	Reader 1	Reader 2	Reader 3	Reader 4	All Readers
						after Consensus
	No. of MRI	143	138	139	144	282
	datasets
	Concordance	0.88 (0.80-0.96) 0.75 (0.65, 0.86) 0.73 (0.63, 0.83) 0.84 (0.76, 0.93) 0.88 (0.82, 0.93)
	between real
	and synthetic
	FLAIR*

Note.-FLAIR = fluid-attenuated inversion recovery. *Data are expressed as  values, with 95% CIs in parentheses.

Table 3 : Comparison of DWI-FLAIR Mismatch Diagnostic Value using Real FLAIR and Synthetic FLAIR for the Identification of

 3 ≤4.5h Acute Ischemic Stroke

	Statistic	Real FLAIR	Synthetic FLAIR	P Value
	Sensitivity	107/131 (82%) [74, 87]	111/131 (85%) [78, 90] 0.2
	Specificity	96/104 (92%) [86, 96]	96/104 (92%) [86, 96]	0.92
	Positive predictive value	107/115 (93%) [87, 96]	111/119 (93%) [87, 97] 0.88
	Negative predictive value 96/120 (80%) [72, 86]	96/116 (83%) [75, 89]	0.21

Note.-Diagnostic value was computed in the 235 MRI datasets where stroke onset-to-MRI delay was available and both real fluid-attenuated inversion recovery (FLAIR) and synthetic FLAIR images were assessable. Data are expressed as number of MRI datasets, with corresponding percentages in parentheses and 95% CIs in brackets. Sensitivities and specificities were compared using McNemar test; positive and negative predictive values were compared using relative predictive values. Page 33 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY Supplemental

tables Supplemental Table: Concordance between real FLAIR and synthetic FLAIR after consensus procedure

	Variable	DWI-FLAIR	No DWI-FLAIR	Non-	Total
		mismatch with real	mismatch with real	assessable
		FLAIR	FLAIR	with real FLAIR
	DWI-FLAIR mismatch
	with synthetic FLAIR

as a substitute for FLAIR sequence in acute ischemic stroke Benzakoun J et al. Published Online

			RADIOLOGY
	120	thrombolysis: incidence, Is Unexplained Early Neurological	Seners	Stroke	2017 10.1161/
		predictors, and associated factors Deterioration After Intravenous			STROKEAHA.116.015414
	Patient 153	Title Susceptibility vessel sign on T2* Thrombolysis Associated With	First Soize	Journal Eur J Neurol 2015 10.1111/ ene.12693 Year DOI
	overlap	magnetic resonance imaging and Thrombus Extension?	Author
	number 244	recanalization results of Do Fluid-Attenuated Inversion	Mahdjoub AJNR Am J	2018 10.3174/ajnr.A5431
	44	MR imaging helps predict time mechanical thrombectomy with Recovery Vascular	Petkova	Radiology Neuroradiol	2010 10.1148/ radiol.10100461
		from symptom onset in patients stent retrievers: a multicentre Hyperintensities Represent Good
		with acute stroke: implications for cohort study Collaterals before Reperfusion
	155	patients with unknown onset time How sustained is 24-hour Therapy?	Soize	Stroke	2015 10.1161/
	115 138	Prevalence of MRI-defined recent diffusion-weighted imaging lesion White matter hyperintensity	Tisserand Neurology Boulouis Neurology	2011 10.1212/ STROKEAHA.114.008322 2019 10.1212/
		silent ischemia and associated reversal? Serial magnetic burden in patients with ischemic			WNL.0b013e3182152855 WNL.0000000000008317
		bleeding risk with thrombolysis resonance imaging in a patient stroke treated with
	176	Diffusion lesion reversal after cohort thrombolyzed within 4.5 thrombectomy	Labeyrie	Stroke	2012 10.1161/
	156	thrombolysis: a MR correlate of hours of stroke onset MT-DRAGON score for outcome	Ben	J	STROKEAHA.112.661009 2020 10.1136/ neurintsurg-
	141	early neurological improvement Do FLAIR vascular hyperintensities prediction in acute ischemic	Legrand Hassen	AJNR Am J Neurointerv	2015 10.3174/ ajnr.A4088 2019-015105
	186	Clinical and magnetic resonance beyond the DWI lesion represent stroke treated by mechanical	Apoil	J Am Heart Neuroradiol Surg	2013 10.1161/
		imaging predictors of very early the ischemic penumbra? thrombectomy within 8 hours		Assoc	JAHA.113.000511
	453 33	neurological response to Clinical Scales Do Not Reliably Tissue no-reflow despite full	Turc Schiphorst J Cereb Stroke	2016 10.1161/ 2021 10.1177/
		intravenous thrombolysis in Identify Acute Ischemic Stroke recanalization following		Blood Flow	STROKEAHA.116.013144 0271678X20954929
		patients with middle cerebral Patients With Large-Artery thrombectomy for anterior		Metab
		artery occlusion Occlusion circulation stroke with proximal
	330 267	Can DWI-ASPECTS substitute for Does Diffusion Lesion Volume occlusion: A clinical study	de Tisserand Stroke Stroke	2013 10.1161/ 2016 10.1161/
	127	lesion volume in acute stroke? Above 70 mL Preclude Favorable Benefit of first-pass complete	Margerie-Ben	STROKEAHA.113.003047 STROKEAHA.115.012518 Eur J Neurol 2021 10.1111/ ene.14490
		Outcome Despite Post-reperfusion in thrombectomy is	Mellon Hassen
	184	Clot burden score on admission Thrombolysis Recanalization? mediated by limited infarct	Legrand	Stroke	2013 10.1161/
	322	T2*-MRI predicts recanalization in Comparison between voxel-based growth	Ben	STROKEAHA.113.001026 Int J Stroke 2016 10.1177/
	394	acute stroke and subtraction methods for Tissue outcome prediction in	Hassen Benzakoun J Cereb	1747493015616636 2021 10.1177/
	228	Magnetic Resonance Imaging-measuring diffusion-weighted hyperacute Ischemic Stroke:	Turc	Stroke Blood Flow	2013 10.1161/ 0271678X211024371
		DRAGON score: 3-month outcome imaging lesion growth after comparison of machine learning		Metab	STROKEAHA.111.000127
		prediction after intravenous thrombolysis models
	164	thrombolysis for anterior Fluid-Attenuated Inversion	Legrand	Stroke	2016 10.1161/
		circulation stroke Recovery Vascular			STROKEAHA.115.010999
	309	Mechanisms of unexplained Hyperintensities-Diffusion-	Tisserand Stroke	2014 10.1161/
		neurological deterioration after Weighted Imaging Mismatch			STROKEAHA.114.006745
		intravenous thrombolysis Identifies Acute Stroke Patients
	30	Is white matter more prone to Most Likely to Benefit From	Tisserand Stroke	2014 10.1161/
		diffusion lesion reversal after Recanalization			STROKEAHA.113.004000
	63	thrombolysis? Can a 15-sec FLAIR replace	Benzakoun J	2017 10.1016/
	279	Unexplained early neurological conventional FLAIR sequence in	Seners	Stroke Neuroradiol	2014 10.1161/ j.neurad.2016.11.001
		deterioration after intravenous stroke MR protocols?			STROKEAHA.114.005426

Page 45 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY Annex: List of studies with overlapping patients Page 47 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org Page 48 of 48 10 E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY Synthetic FLAIR : DATE, 2021 https://doi.org/10.1148/radiol.2021211394

E. Doty St., Suite 441, Madison, WI 53703, 630-481-1047, radiology@rsna.org RADIOLOGY

Supplemental figures

Supplemental Figure 1 All patients in test set were evaluated by two distinct readers for interobserver reproducibility. Half of the test set was used for intraobserver reproducibility assessment.