# Nostra Domina at EvaLatin 2024:
Improving Latin Polarity Detection through Data Augmentation

###### Abstract

This paper describes submissions from the team Nostra Domina to the EvaLatin
2024 shared task of emotion polarity detection. Given the low-resource
environment of Latin and the complexity of sentiment in rhetorical genres like
poetry, we augmented the available data through automatic polarity annotation.
We present two methods for doing so on the basis of the $k$-means algorithm,
and we employ a variety of Latin large language models (LLMs) in a neural
architecture to better capture the underlying contextual sentiment
representations. Our best approach achieved the second highest macro-averaged
Macro-F1 score on the shared task’s test set.

Keywords: emotion polarity detection, sentiment analysis, data augmentation,
Latin, LLMs

Nostra Domina at EvaLatin 2024:
Improving Latin Polarity Detection through Data Augmentation

Stephen Bothwell, Abigail Swenor, David Chiang
---
University of Notre Dame
Notre Dame, Indiana, USA
{sbothwel, aswenor<EMAIL_ADDRESS>

Abstract content

## 1\. Introduction

Emotion polarity detection is a variant on the common NLP task of sentiment
analysis. Usual applications of this task tend to be on reviews—for example,
about movies (Maas et al., 2011; Socher et al., 2013) or products (Blitzer et
al., 2007)—where providing an opinion is the author’s goal. Few works have
extended this task to less direct modalities of sentiment, like poetry, and
even fewer to ancient languages, like Latin (Chen and Skiena, 2014; Marley,
2018; Sprugnoli et al., 2020, 2023). Thus, the EvaLatin 2024 evaluation
campaign’s take on this task Sprugnoli et al. (2024) tackles both an uncommon
genre and a low-resource environment.

Motivated by the lack of sentiment resources, this work presents two methods
for the automatic annotation of data: polarity coordinate clustering, a novel
specialization on $k$-means clustering, and Gaussian clustering. Furthermore,
our work examines a variety of different Latin LLMs in a straightforward
neural architecture through a hyperparameter search to determine their
efficacy on the emotion polarity detection task. To our knowledge, we are the
first outside of the original authors to explicitly apply some of these
language models for Latin.111We make our data and code available at:
https://github.com/Mythologos/EvaLatin2024-NostraDomina.

After we introduce the small set of pre-existing data for this task, we
describe our clustering-based annotation methods (Section 2.1) and their
results (Section 2.1.3). Then, we describe our neural architecture (Section 3)
and the procedure used for model training and selection (Section 4.1).
Finally, we go over our results for this task and investigate why our models
performed as they did, with one achieving the second best macro-averaged
Macro-F1 score on EvaLatin’s test set (Section 5).

## 2\. Data

Figure 1: The polarity coordinate plane. Points are all colored differently to
represent their classes and are labeled accordingly. The $x$-axis and $y$-axis
represent polarity and intensity, respectively.

Very little data exists for sentiment analysis in Latin. Until recently, only
static representations of sentiment were available in sentiment lexica. To our
knowledge, the first Latin sentiment lexicon was one automatically transferred
to Latin based on English lexica and a large knowledge graph (Chen and Skiena,
2014). This was followed by two others. One was manually curated by a single
author based on Stoic values in a study on Cicero (Marley, 2018). The other,
called LatinAffectus, was created by multiple Latin experts and organized
according to inter-annotator agreement (Sprugnoli et al., 2020); its most
recent version, LatinAffectus-v4, was released for use in this shared task.

Following this, Sprugnoli et al. released the first dataset for Latin
sentiment analysis. This dataset, having the same classes as our shared task,
covers a selection of Horace’s Odes—a staple of classical poetry. It contains
44 labeled sentences and has the class distribution given in Table 1. Although
this dataset lays groundwork for future studies in Latin sentiment analysis,
it is not large enough to train a traditional neural classifier. This is
especially the case for a genre which indirectly conveys opinions: poetry
frequently employs allusion (e.g., to contemporary circumstances) and
rhetorical devices (e.g., metaphor, sarcasm) to make its points.

Given this lack of available training data, we investigate automatic
annotation to approximate sentiment for Latin. Because of the variety of time
periods, genres, and additional annotations covered by the Universal
Dependency (UD) (de Marneffe et al., 2021) treebanks for Latin, we select each
of the Perseus (Smith et al., 2000; Bamman and Crane, 2011), PROIEL (Haug et
al., 2009), ITTB (Passarotti, 2019), LLCT (Cecchini et al., 2020a), and UDante
(Cecchini et al., 2020b) treebanks for this purpose. We also incorporate data
from EvaLatin 2022 (Sprugnoli et al., 2022) and the Archimedes Latinus
treebank (Fantoli and de Lhoneux, 2022).

Dataset | Class
---|---
Positive | Negative | Neutral | Mixed
Odes | 20 | 12 | 3 | 9
PC | 10427 | 4114 | 57786 | 4178
Gaussian | 33473 | 14333 | 16861 | 11838
Horace | 20 | 55 | 8 | 15
Pontano | 48 | 18 | 10 | 22
Seneca | 7 | 81 | 2 | 13
Total | 75 | 154 | 20 | 50
Table 1: Resource class distributions. The top, middle, and bottom sections
(broken up by pairs of lines) concern pre-existing resources, new resources,
and EvaLatin test subsets (or the total set), respectively. “PC” is Polarity
Coordinate.

### 2.1. Automatic Annotation

In this section, we detail our data augmentation methods. Both methods relate
to the $k$-means clustering algorithm, where central points—centroids—are
selected, and the distances between a data point and these centroids relate
them in some way.

#### 2.1.1. Polarity Coordinate (PC) Clustering

The task of emotion polarity detection, for the available Latin sentiment
data, categorizes each sentence into one of four classes: positive, negative,
neutral, and mixed (Sprugnoli et al., 2023). This set of classes stems from
the circumplex model of affect Russell and Mehrabian (1977); Russell (1980) in
which emotions are plotted on a two-dimensional plane with the axes of
pleasure-displeasure and arousal-sleep. Sentiment analysis works have often
applied this theory with varying terminology Tian et al. (2018). In our case,
we use polarity to refer to the “direction” of sentiment (i.e., pleasing or
displeasing) and intensity to refer to the magnitude of the sentiment (i.e.,
aroused or inert).

These definitions of polarity and intensity can be used to differentiate the
four classes for our task. For a given sentence, if its polarity is
definitively pleasing, then it is positive; if its polarity is definitively
displeasing, then it is negative; if its polarity has both positive and
negative elements and has high intensity, then it is mixed; and if it fits
into none of these categories (i.e., there is no moderate intensity in either
direction), then it is neutral. We employ this mapping to classify sentences
via the $k$-means algorithm. To do so, we must determine the representation
for our classes as centroids and our sentences as data points.

Following the idea of the circumplex model, we establish polarity and
intensity on a coordinate plane. However, we map the space of these values
between 0 and 1, meaning that the point (0.5, 0.5) represents a point of
average polarity and intensity. This point is equidistant from each of the
four designated class centroids, which we present in Figure 1. Although the
positive and negative classes have no innate relation to intensity, we assume
that some intensity must exist for the polarity to be noticeable. Given these
centroids, we then define a polarity coordinate $P$ for a sequence
$\mathbf{x}$ as:

$\displaystyle P_{\mathbf{x}}$
$\displaystyle=(\text{polarity}(\mathbf{x}),\text{intensity}(\mathbf{x}))$ (1)
$\displaystyle\text{polarity}(\mathbf{x})$
$\displaystyle=\left(\frac{1}{2|\mathbf{x}|}\sum_{i=1}^{|\mathbf{x}|}\text{score}(x_{i})\right)+\frac{1}{2}$
(2) $\displaystyle\text{intensity}(\mathbf{x})$
$\displaystyle=\frac{1}{|\mathbf{x}|}\sum_{i=1}^{|\mathbf{x}|}|\text{score}(x_{i})|$
(3)

and score outputs values between -1 and 1.

To classify sentences, we used LatinAffectus-v4 as the crux of our scoring
function. Each $x_{i}\in\mathbf{x}$ was searched in the lexicon. To search the
lexicon, we used lemmata from the treebank sentences if they were available
and the LatinBackoffLemmatizer from the Classical Language Toolkit (CLTK) as a
backoff option Johnson et al. (2021).222While not necessary for most treebank
data, the Archimedes Latinus treebank (Fantoli and de Lhoneux, 2022) does not
provide lemmata. To prevent the impact of sentiment words from being
diminished due to the fact that the majority of words were not found in the
lexicon, we only used words in LatinAffectus-v4 to score each sentence. This
meant that the polarity and intensity functions would receive a filtered
$\mathbf{x^{\prime}}$ rather than $\mathbf{x}$. Sentences with no lexical
entries were deemed neutral.

Although this method was inspired by the task structure, we suspected that its
outputs would be noisy, as it employed static sentiment representations. To
account for the noise, we attempted to use the distances between a sentence
and each centroid to our advantage. Suppose that we have a collection of
distances $\mathbf{d}$. We normalized these distances $\mathbf{d}$; call this
set of normalized distances $\mathbf{d}^{\prime}$. Then, we calculated a value
$\alpha$ for each sentence by subtracting $\min{(\mathbf{d}^{\prime})}$ from
$1$. This $\alpha$ serves as a confidence value for the given label. If the
distance for a sentence and its label is low, then the sentence may be a
stronger representative for that class and can aid more in the learning
process.

With this in mind, we augmented the traditional cross-entropy loss function
with a set of these $\alpha$ values, forming what we call the gold distance
weighted cross-entropy (GDW-CE) loss. Given predictions $\mathbf{Y}^{\prime}$
and ground truth values $\mathbf{Y}$ (where
$|\mathbf{Y}^{\prime}|=|\mathbf{Y}|=N$), confidence values
$\boldsymbol{\alpha}$, and the cross-entropy function $H$, the equation for
this loss is:

$\textbf{GDW-
CE}(\mathbf{Y^{\prime}},\mathbf{Y},\boldsymbol{\alpha})=\sum_{i=0}^{N}(\alpha_{i}*H(Y^{\prime}_{i},Y_{i}))$
(4)

#### 2.1.2. Gaussian Clustering

Unlike $k$-means clustering, Gaussian clustering does not serve as an explicit
classifier; instead, it outputs the probabilities for which a given data point
is within each cluster. Naturally, however, we can take the cluster with the
highest probability to be the label for any given data point. Once again,
then, what remains is to establish how the class and sentence representations
are derived.

To derive class representations, we trained a Gaussian Mixture Model (GMM)
drawn from four distributions (i.e., classes) on the Odes dataset Sprugnoli et
al. (2023). We fitted a GMM with the scikit-learn library Virtanen et al.
(2020) via the expectation-maximization algorithm. To gather representations
for each sentence, we computed sentence-level embeddings from the SPhilBERTa
model Riemenschneider and Frank (2023b), a pre-trained language model for
English, Latin, and Ancient Greek based on the Sentence-BERT architecture
Reimers and Gurevych (2019). We appended the polarity coordinate features
described in Section 2.1.1 to these embeddings.

We performed a hyperparameter grid search to select the best GMM. Due to space
considerations, we defer the details of this search to our repository. Because
of the available data’s size, trials were both trained and evaluated on the
Odes for their Macro-F1 score; the best GMM scored $0.37$.

#### 2.1.3. Annotation Results

The outcomes of both annotation methods are provided in the middle of Table 1.
The PC and Gaussian datasets have dissimilar distributions, preferring the
neutral and positive classes, respectively.

## 3\. Modeling

Embedding{Latin BERT, LaBERTa, PhilBERTa, mBERT, CANINE-C, CANINE-S,
SPhilBERTa} Encoder{None, BiLSTM, Transformer} Linear Figure 2: Architectural
options fixed across hyperparameter search trials. Shapes reflect the relative
dimensionality of data throughout the network.

We apply a basic neural architecture for the emotion polarity detection task.
As Figure 2 depicts, there are three main parts to this architecture: the
embedding, encoder, and linear layers. For the embedding and encoder layers,
we have alternatives for each which we examine in our experiments.

For our embeddings, we use all known publicly-available encoder-based LMs
containing Latin. Latin BERT Bamman and Burns (2020), LaBERTa and PhilBERTa
Riemenschneider and Frank (2023a), and SPhilBERTa Riemenschneider and Frank
(2023b) are all either monolingual models (in the case of Latin BERT and
LaBERTa) or classical trilingual models (PhilBERTa and SPhilBERTa). We also
used the multilingual mBERT Devlin et al. (2019) and the character-based
CANINE-C and CANINE-S Clark et al. (2022), trained with character-based and
subword-based losses, respectively. We froze embeddings during training to
maintain their contextual representations.

For our encoders, we employ an identity transformation, a bidirectional LSTM
(BiLSTM) Graves and Schmidhuber (2005), and a Transformer Vaswani et al.
(2017). For the BiLSTM, we concatenate the final hidden states for both
directional LSTMs to provide the final state for classification. For the
identity layer and the Transformer, we select the [CLS] token’s
representation.

## 4\. Experiments

Embedding | Encoder
---|---
Identity | LSTM | Transformer
Latin BERT |  0.12† |  0.21∗ |  0.12†
LaBERTa |  0.03∗ |  0.17∗ |  0.21†
PhilBERTa |  0.06∗ |  0.15∗ |  0.13†
mBERT |  0.07† |  0.09† |  0.08†
CANINE-C |  0.14∗ |  0.20† |  0.03∗
CANINE-S |  0.08† |  0.17∗ |  0.18†
SPhilBERTa |  0.23∗ | – | –
Table 2: Odes Macro-F1 scores for models trained with data annotated with PC
clustering. Since two loss functions were applied per embedding-encoder pair,
we show only each pair’s maximum score. Values with a $*$ use cross entropy
loss, whereas values with a $\dagger$ use GDW-CE loss.

### 4.1. Experimental Design

We divided our annotated data into three splits for training, validation, and
testing. The sets contained 80% (61,204 examples), 10% (7,651 examples), and
10% (7,650 examples) of the overall data, respectively. We used the validation
data during training to permit early stopping, setting Macro-F1 as our
criterion of interest with a patience of 10. Otherwise, training would halt
after 100 epochs.

We implemented our neural architecture with the PyTorch library Paszke et al.
(2019). With a fixed random seed, model inputs were tokenized and truncated to
the maximum sequence length of the selected Latin LM. They were grouped into
batches of size 16 for all LMs save for CANINE-C and CANINE-S, as such models
stressed memory resources with a maximum sequence length of 2048; in this
case, we used a batch size of 8.

When Transformers were used, we fixed their attention heads to 8, used ReLU
activations, and applied PreNorm Chen et al. (2018); Nguyen and Salazar
(2019). We used either cross-entropy or GDW-CE to compute the loss. We
optimized the neural networks with the Adam optimizer Kingma and Ba (2015),
and gradients were clipped with an L2 norm of 1 Pascanu et al. (2013).

### 4.2. Hyperparameter Search

To avoid falling prey to poor hyperparameter selections for each instance of
our architecture, we perform a random hyperparameter search Bergstra and
Bengio (2012) of four trials for each instance. We vary the learning rate,
hidden size, and number of layers in the encoder. We provide the ranges for
these values with this work’s repository.

Instances were constructed by fixing four modeling components: the embedding,
the encoder, the dataset, and the loss function. SPhilBERTa was only employed
with the PC dataset, as it was used to create the Gaussian dataset; moreover,
it only used the identity-based encoder, as it creates a sequence-level
embedding. Finally, the GDW-CE loss was only applied with the PC dataset.

Once all sets of four trials were finished, we evaluated these models on the
automatically-annotated test set. The best model among these four was then
tested on the Odes data.

Embedding | Encoder
---|---
Identity | LSTM | Transformer
Latin BERT | 0.38 | 0.38 | 0.38
LaBERTa | 0.31 | 0.31 | 0.37
PhilBERTa | 0.24 | 0.39 | 0.41
mBERT | 0.19 | 0.20 | 0.30
CANINE-C | 0.26 | 0.33 | 0.24
CANINE-S | 0.27 | 0.37 | 0.30
Table 3: Odes Macro-F1 scores for models trained with data annotated with
Gaussian clustering.

## 5\. Results

Split | Macro-Avg. | Micro-Avg.
---|---|---
Score ($\uparrow$) | Rank ($\downarrow$) | Score ($\uparrow$)
Horace | 0.29 | 3 | –
Pontano | 0.42 | 1 | –
Seneca | 0.12 | 4 | –
Total | 0.28 | 2 | 0.22

Split | Macro-Avg. | Micro-Avg.
---|---|---
Score ($\uparrow$) | Rank ($\downarrow$) | Score ($\uparrow$)
Horace | 0.21 | 4 | –
Pontano | 0.31 | 3 | –
Seneca | 0.14 | 3 | –
Total | 0.22 | 4 | 0.22

Figure 3: Ranks and reported Macro-F1 score averages for our EvaLatin 2024
shared task submissions. The left and right tables are for the first and
second submissions, respectively. Ranks range between 1 and 4, not accounting
for the baseline. When a tie occurs, the best possible ranking is displayed.

Figure 4: Confusion matrices for our best-performing submission. The left
matrix is for the whole EvaLatin 2024 test set, whereas the right matrix is
for the Pontano subset. Darker colors indicate larger values on the heatmap;
text colors are shifted for readability.

We present a sampling of our experimental results in Tables 2 and 3,
emboldening top two results across both tables. According to the Odes test
set, the Gaussian dataset had a more reliable signal for sentiment. Our top
two results used PhilBERTa embeddings with non-identity encoders. We submitted
these models to the shared task, labeling the Transformer encoder model as our
first submission and the BiLSTM encoder model as our second.

We provide our results in the shared task in Fig. 3. The first submission
generally outperformed the second, only falling below the other on our worst-
performing split: Seneca’s Hercules Furens. When considering other teams’
submissions, our first submission achieved the best macro-averaged Macro-F1
score on the Pontano split by 0.1 points, and it narrowly missed tying for the
top overall score (merited by TartuNLP) by 0.01 points. Thus, although our
method did not place first, it nevertheless closely rivaled the best-
performing method.

One question arising from our results concerns why the Gaussian dataset
broadly outperformed the PC dataset. We speculate that this relates to the
distributions of the underlying data, as presented in Table 1. The PC dataset
heavily favored the neutral class; whether this resembles the true
distribution or not, it poorly matched the distributions of the test set. The
neutral class is consistently the smallest class among the emotionally-charged
poems (Horace), lullabies (Pontano), and tragedy (Seneca) in the test set.
Conversely, the Gaussian dataset has a more balanced spread of classes. Yet
the lean of the Gaussian dataset’s distribution into the positive class may
help to explain our model’s first-place performance on the Pontano subset.

To provide further evidence for this claim, we depict confusion matrices for
our best-performing submission in Figure 4.333The matrices for our other
submission are quite similar, so the trends described also apply to it. For
both the whole test set and the Pontano subset, the model primarily predicted
the positive class, followed by the neutral class. In the case of the full
dataset, these positive guesses add up to the largest sources of error: the
model frequently mistakes negative sentences for positive ones. This effect is
drastically reduced in the Pontano subset, as most of the sentences are
positive. Altogether, these points further signal the meaningful influence of
the Gaussian dataset’s distribution on the model’s performance.

To examine this influence in more detail, we check the level of agreement
between our best neural models and the original Gaussian clustering annotator.
Running EvaLatin’s test data through the Gaussian model, we use Cohen’s
$\kappa$ Cohen (1960); Artstein and Poesio (2008) to measure our models’
agreement beyond chance. Our top two neural models, which were trained on the
Gaussian model’s automatically annotated data, have $\kappa$ values of $0.32$
and $0.38$. These weak agreement scores in combination with the prior evidence
seem to imply that, although the neural models roughly inherited the Gaussian
annotator’s classification distribution, the networks’ additional learning
produced distinct cues for classification labels. Such effects may be ripe
material for further investigation in improving low-resource polarity
detection.

## 6\. Conclusion

This paper presents two methods for data augmentation in a low-resource
context. Each method employs a clustering-based approach to automatically
annotate Latin data for polarity detection. The best of our models, using
PhilBERTa-based embeddings, a Transformer encoder, and our dataset derived
from Gaussian clustering, placed second in the task based on the macro-
averaged Macro-F1 score. Future work could explore the refinement of
automatically-annotated data, perhaps integrating the expectation-maximization
style of Gaussian training into a neural network to account for noise.

## 7\. Acknowledgements

We would like to thank the EvaLatin organizers for their work in facilitating
this shared task. We would also like to thank Margherita Fantoli for providing
some clarifications about the Archimedes Latinus treebank (Fantoli and de
Lhoneux, 2022). Finally, we would like to thank Darcey Riley, Ken Sible,
Aarohi Srivastava, Chihiro Taguchi, Andy Yang, and Walter Scheirer for their
feedback and support.

This research was supported in part by an FRSP grant from the University of
Notre Dame.

## 8\. Bibliographical References

##

  * Artstein and Poesio (2008) Ron Artstein and Massimo Poesio. 2008.  Inter-coder agreement for computational linguistics.  _Computational Linguistics_ , 34(4):555–596.
  * Bamman and Burns (2020) David Bamman and Patrick J. Burns. 2020.  Latin BERT: A contextual language model for classical philology.
  * Bergstra and Bengio (2012) James Bergstra and Yoshua Bengio. 2012.  Random search for hyper-parameter optimization.  _Journal of Machine Learning Research_ , 13:281–305.
  * Chen et al. (2018) Mia Xu Chen, Orhan Firat, Ankur Bapna, Melvin Johnson, Wolfgang Macherey, George Foster, Llion Jones, Mike Schuster, Noam Shazeer, Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Zhifeng Chen, Yonghui Wu, and Macduff Hughes. 2018.  The best of both worlds: Combining recent advances in neural machine translation.  In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 76–86, Melbourne, Australia. Association for Computational Linguistics.
  * Clark et al. (2022) Jonathan H. Clark, Dan Garrette, Iulia Turc, and John Wieting. 2022.  Canine: Pre-training an efficient tokenization-free encoder for language representation.  _Transactions of the Association for Computational Linguistics_ , 10:73–91.
  * Cohen (1960) Jacob Cohen. 1960.  A coefficient of agreement for nominal scales.  _Educational and Psychological Measurement_ , 20(1):37–46.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Graves and Schmidhuber (2005) Alex Graves and Juergen Schmidhuber. 2005.  Framewise phoneme classification with bidirectional LSTM networks.  In _Proceedings. 2005 IEEE International Joint Conference on Neural Networks, 2005._ , volume 4, pages 2047–2052 vol. 4.
  * Johnson et al. (2021) Kyle P. Johnson, Patrick J. Burns, John Stewart, Todd Cook, Clément Besnier, and William J. B. Mattingly. 2021.  The Classical Language Toolkit: An NLP framework for pre-modern languages.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations_ , pages 20–29, Online. Association for Computational Linguistics.
  * Kingma and Ba (2015) Diederik P. Kingma and Jimmy Ba. 2015.  Adam: A method for stochastic optimization.  In _3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings_.
  * Nguyen and Salazar (2019) Toan Q. Nguyen and Julian Salazar. 2019.  Transformers without tears: Improving the normalization of self-attention.  In _Proceedings of the 16th International Conference on Spoken Language Translation_ , Hong Kong. Association for Computational Linguistics.
  * Pascanu et al. (2013) Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013.  On the difficulty of training recurrent neural networks.  In _Proceedings of the 30th International Conference on Machine Learning_ , volume 28 of _Proceedings of Machine Learning Research_ , pages 1310–1318, Atlanta, Georgia, USA. PMLR.
  * Paszke et al. (2019) Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019.  PyTorch: An imperative style, high-performance deep learning library.  In _Advances in Neural Information Processing Systems 32_ , pages 8024–8035. Curran Associates, Inc.
  * Reimers and Gurevych (2019) Nils Reimers and Iryna Gurevych. 2019.  Sentence-BERT: Sentence embeddings using siamese BERT-networks.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 3982–3992, Hong Kong, China. Association for Computational Linguistics.
  * Riemenschneider and Frank (2023a) Frederick Riemenschneider and Anette Frank. 2023a.  Exploring large language models for classical philology.  In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 15181–15199, Toronto, Canada. Association for Computational Linguistics.
  * Riemenschneider and Frank (2023b) Frederick Riemenschneider and Anette Frank. 2023b.  Graecia capta ferum victorem cepit. Detecting Latin allusions to Ancient Greek literature.
  * Russell (1980) James A. Russell. 1980.  A circumplex model of affect. _Journal of Personality and Social Psychology_ , 39(6):1161–1178.
  * Russell and Mehrabian (1977) James A. Russell and Albert Mehrabian. 1977.  Evidence for a three-factor theory of emotions.  _Journal of Research in Personality_ , 11(3):273–294.
  * Sprugnoli et al. (2024) Rachele Sprugnoli, Federica Iurescia, and Marco Passarotti. 2024.  Overview of the EvaLatin 2024 evaluation campaign.  In _Proceedings of the Third Workshop on Language Technologies for Historical and Ancient Languages – LT4HALA 2024_ , Torino, Italy. European Language Resources Association.
  * Tian et al. (2018) Leimin Tian, Catherine Lai, and Johanna Moore. 2018.  Polarity and intensity: The two aspects of sentiment analysis.  In _Proceedings of Grand Challenge and Workshop on Human Multimodal Language (Challenge-HML)_ , pages 40–47, Melbourne, Australia. Association for Computational Linguistics.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc.
  * Virtanen et al. (2020) Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, Stéfan J. van der Walt, Matthew Brett, Joshua Wilson, K. Jarrod Millman, Nikolay Mayorov, Andrew R. J. Nelson, Eric Jones, Robert Kern, Eric Larson, C J Carey, İlhan Polat, Yu Feng, Eric W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, E. A. Quintero, Charles R. Harris, Anne M. Archibald, Antônio H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt, and SciPy 1.0 Contributors. 2020.  SciPy 1.0: Fundamental algorithms for scientific computing in Python.  _Nature Methods_ , 17:261–272.

## 9\. Language Resource References

##

  * Bamman and Crane (2011) David Bamman and Gregory Crane. 2011.  The Ancient Greek and Latin dependency treebanks.  In _Language Technology for Cultural Heritage_ , Theory and Applications of Natural Language Processing, pages 79–98. Springer Berlin Heidelberg, Berlin, Heidelberg.
  * Blitzer et al. (2007) John Blitzer, Mark Dredze, and Fernando Pereira. 2007.  Biographies, Bollywood, boom-boxes and blenders: Domain adaptation for sentiment classification.  In _Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics_ , pages 440–447, Prague, Czech Republic. Association for Computational Linguistics.
  * Cecchini et al. (2020a) Flavio Massimiliano Cecchini, Timo Korkiakangas, and Marco Passarotti. 2020a.  A new Latin treebank for Universal Dependencies: Charters between Ancient Latin and Romance languages.  In _Proceedings of the 12th Language Resources and Evaluation Conference_ , pages 933–942, Marseille, France. European Language Resources Association.
  * Cecchini et al. (2020b) Flavio Massimiliano Cecchini, Rachele Sprugnoli, Giovanni Moretti, and Marco Passarotti. 2020b.  UDante: First steps towards the Universal Dependencies treebank of Dante’s Latin works.  In _Proceedings of the Seventh Italian Conference on Computational Linguistics, CLiC-it 2020, Bologna, Italy, March 1-3, 2021_ , volume 2769 of _CEUR Workshop Proceedings_. CEUR-WS.org.
  * Chen and Skiena (2014) Yanqing Chen and Steven Skiena. 2014.  Building sentiment lexicons for all major languages.  In _Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)_ , pages 383–389, Baltimore, Maryland. Association for Computational Linguistics.
  * de Marneffe et al. (2021) Marie-Catherine de Marneffe, Christopher D. Manning, Joakim Nivre, and Daniel Zeman. 2021.  Universal Dependencies.  _Computational Linguistics_ , 47(2):255–308.
  * Fantoli and de Lhoneux (2022) Margherita Fantoli and Miryam de Lhoneux. 2022.  Linguistic annotation of neo-Latin mathematical texts: A pilot-study to improve the automatic parsing of the Archimedes Latinus.  In _Proceedings of the Second Workshop on Language Technologies for Historical and Ancient Languages_ , pages 129–134, Marseille, France. European Language Resources Association.
  * Haug et al. (2009) Dag T. Haug, Marius L. Jøhndal, Hanne M. Eckhoff, Eirik Welo, Mari J. B. Hertzenberg, and Angelika Müth. 2009.  Computational and linguistic issues in designing a syntactically annotated parallel corpus of Indo-European languages.  In _Traitement Automatique Des Langues, Volume 50, Numéro 2: Langues Anciennes [Ancient Languages]_ , pages 17–45, France. ATALA (Association pour le Traitement Automatique des Langues).
  * Maas et al. (2011) Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011.  Learning word vectors for sentiment analysis.  In _Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies_ , pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics.
  * Marley (2018) Caitlin A. Marley. 2018.  _Sentiments, Networks, Literary Biography: Towards a Mesoanalysis of Cicero’s Corpus_.  Ph.D. thesis, University of Iowa.
  * Passarotti (2019) Marco Passarotti. 2019.  The Project of the Index Thomisticus Treebank.  In _Digital Classical Philology_ , volume 10, pages 299–320. De Gruyter, Berlin, Boston.
  * Smith et al. (2000) David A. Smith, Jeffrey A. Rydberg-Cox, and Gregory R. Crane. 2000.  The Perseus project: A digital library for the humanities.  _Literary and linguistic computing_ , 15(1):15–25.
  * Socher et al. (2013) Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013.  Recursive deep models for semantic compositionality over a sentiment treebank.  In _Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing_ , pages 1631–1642, Seattle, Washington, USA. Association for Computational Linguistics.
  * Sprugnoli et al. (2023) Rachele Sprugnoli, Francesco Mambrini, Marco Passarotti, and Giovanni Moretti. 2023\.  The sentiment of Latin poetry. Annotation and automatic analysis of the Odes of Horace.  _IJCoL. Italian Journal of Computational Linguistics_ , 9(1):53–71.
  * Sprugnoli et al. (2022) Rachele Sprugnoli, Marco Passarotti, Flavio Massimiliano Cecchini, Margherita Fantoli, and Giovanni Moretti. 2022.  Overview of the EvaLatin 2022 evaluation campaign.  In _Proceedings of the Second Workshop on Language Technologies for Historical and Ancient Languages_ , pages 183–188, Marseille, France. European Language Resources Association.
  * Sprugnoli et al. (2020) Rachele Sprugnoli, Marco Passarotti, Daniela Corbetta, and Andrea Peverelli. 2020\.  Odi et amo. Creating, evaluating and extending sentiment lexicons for Latin. In _Proceedings of The 12th Language Resources and Evaluation Conference_ , pages 3078–3086, Marseille, France. European Language Resources Association.


Diffraction-before-destruction imaging with single ultrashort X-ray pulses has the potential to visualise non-equilibrium processes, such as chemical reactions, at the nanoscale with sub-femtosecond resolution in the native environment without the need of crystallization<cit.>. Here, a nanospecimen partially diffracts a single X-ray flash before sample damage occurs. The structural information of the sample can be reconstructed from the coherent X-ray interference image. State-of-art spatial resolution of such snapshots from individual heavy element nanoparticles is limited to a few nanometers<cit.>. Further improvement of spatial resolution requires higher image brightness which is ultimately limited by bleaching effects<cit.> of the sample. We compared snapshots from individual 100 nm Xe nanoparticles as a function of the X-ray pulse duration and incoming X-ray intensity in the vicinity of the Xe M-shell resonance. Surprisingly, images recorded with few femtosecond and sub-femtosecond pulses are up to 10 times brighter than the static linear model predicts <cit.>. Our Monte-Carlo simulation and statistical analysis of the entire data set confirms these findings and attributes the effect to transient resonances. Our simulation suggests that ultrafast form factor changes during the exposure can increase the brightness of X-ray images by several orders of magnitude. Our study guides the way towards imaging with unprecedented combination of spatial and temporal resolution at the nanoscale.

The combination of coherent diffraction imaging (CDI) with bright and focused femtosecond short flashes from X-ray Free Electron lasers (FELs) has brought to light transient phenomena such as metastable stages of metal nanoparticle formation<cit.>, unexpected morphologies diversity  in soot formation<cit.>, complex light matter interaction dynamics<cit.>, vortex organisation in superfluid droplets<cit.>, relaxation of superheated particles on the femtosecond time scale <cit.> and otherwise inaccessible states of water<cit.>.

Theoretical studies suggest that sub-nm spatial resolution within a single FEL exposure is feasible under ideal FEL pulse conditions <cit.>. However, the state-of-art spatial resolution in experimental X-ray CDI from an individual heavy element nanoparticle is limited to a few nanometers <cit.>. Further increase in resolution requires an enhancement in diffraction image brightness, which is proportional to the incoming X-ray photon intensity $I_{ph}$ and the wavelength dependent elastic scattering cross section $\sigma_{scat}$ of the material <cit.>. The image brightness does not scale linearly with $I_{ph}$ for very high photon intensities due to bleaching effects of the sample which can decrease the effective scattering cross section during the FEL exposure <cit.>.

The bleaching is a result of a complex interplay between electronic and ionic structural damage of the sample interacting with an intense X-ray FEL pulse. Electronic damage is initiated by photoionisation processes. Sequential multi-photon absorption and subsequent relaxation processes such as Auger/Coster-Kronig decays remove the electrons from the parent ions on sub-fs to 10-fs time scale. Electron delocalisation increases the transparency of the sample as a shrinking number of bound electrons usually decreases the absorption/scattering cross sections of an ion<cit.>. The subsequent damage to the ionic structure through hydrodynamic expansion is driven by the hot electrons trapped by a rapidly build up space charge. Overall, most experimental and theoretical studies suggest that photoionisation is  detrimental to the quality of the the images <cit.>.

In contrast to previous studies, we find that photoionisation can increase the effective scattering cross section by at least one order of magnitude if FEL pulses are extremely short and tailored to excite transient resonances (TRs). TRs arise when core-hole ionisation events drive the parent ion into  short-lived resonances <cit.>. Previous studies in rare gases reported increases in absorption cross section by almost two orders of magnitude due to individual transient resonances in Ne<cit.> and even transient resonances cascades in Xe atoms at 1500 eV<cit.>. The potential of transient resonances for imaging received little attention so far as first experiments with 100-200 fs long pulses on single nanoparticles suggested detrimental effects to diffraction brightness due to accelerated sample decomposition or nanoplasma effects<cit.>.

The TR mechanism is illustrated in <ref> based on the mechanism of 3d $\rightarrow$ 4f resonant scattering in a neutral Xe atom and a core-excited Xe+$^*$ ion. Resonant scattering occurs through virtual electron transitions between the 3d core level and the unoccupied 4f state as illustrated for neutral Xe ( <ref> a, left panel). If X-rays are scattered by the core-hole excited Xe+$^*$ ion with a modified Coulomb potential ( <ref> a, right panel), the binding energy of the excited 3d$^*$ orbital shifts from $h\nu_1$ (black dashed) to $h\nu_2^* \approx h\nu_1+40 $ eV (red). In addition, the 4f$^*$ orbital in Xe+$^*$  is pulled closer towards the core in order to screen the positive charge visualised as the absolute value of the wave function $|\psi|$ ( <ref> a, top of left panel). This orbital restructuring increases the overlap between the 3d$^*$ and 4f$^*$ wavefunctions. The resulting 3d$^*$ $\rightarrow$ 4f$^*$ transition matrix element   augments the resonance scattering cross section $\sigma_{scat}^*$ by more than one order of magnitude above the neutral Xe $\sigma_{scat}$(red vs dotted line in <ref>b; see Supplements for detailed descriptions of the calculation). The overall lifetime of a single transient resonance is limited by the core-hole decay time or photoionisation rates. A previous absorption spectroscopy study on FEL excited Xe atoms suggested that sequential multiphoton absorption can trigger TR cascades throughout the entire FEL exposure duration at 1500 eV <cit.>.

In our study, we explore how TRs and TR cascades can influence the brightness and spatial resolution of diffraction images of individual Xe nanoparticles as a function of of FEL pulse parameters such as FEL photon energy $h\nu$, pulse energy $E_\mathrm{p}$ and duration $\tau$ (all parameters are summarized in Table 1, Supplements).

A detailed schematic of our experiment is exhibited in Supplements. Individual near-spherical Xe nanoparticles with diameters 40-150 nanometers intersect the path of focused and intense single X-ray FEL pulses inside the LAMP endstation at the Linac Coherent Light Source (LCLS)<cit.>. Single-particle, single-exposure X-ray diffraction snapshots are recorded at 120 Hz using p-n junction charge coupled devices (pnCCDs)<cit.> located at two different positions further downstream from the interaction region. The particle size is directly encoded into the Airy pattern-like diffraction patterns and can be recovered with $\pm 0.3$ nm precision  Cluster size fitting model.
We scanned the photon energy $h\nu$ in the vicinity of the Xe 3d absorption edge between $650\,\mathrm{eV} < h\nu < 740\,\mathrm{eV}$. In addition, we recorded images at $h\nu=1500\,\mathrm{eV}$ based on previously observed TR cascades in Xe ion spectra<cit.>. Each scanning step contains thousands of diffraction patterns from single Xe nanoparticles with fluctuating brightness due to random positions inside the 1.5 $\mu$m FEL focus with a near Gaussian X-ray intensity distribution <cit.> .  We investigated three FEL pulse durations: 200 fs as a typical pulse duration preferred in most ultrafast CDI studies <cit.>, 5-10 fs as a pulse duration beating the onset of the ionic structure damage of the specimen, and newly available sub-fs pulses <cit.> outrunning the electronic damage through Auger decay (Xe M-shell Auger life time $\approx$1 fs). The FEL pulse energy increased in general with the pulse duration, we made measurements with attenuated 200-fs FEL pulse duration as a reference.

The comparison of the brightest images for each pulse duration sheds light on the scattering efficiency and the role of TRs at different time scales. The brightest single X-ray diffraction snapshots per FEL pulse duration are displayed on the left side of <ref>.The diffraction patterns stem from similarly sized nanoparticles with diameters 97$\pm$3 nm. Intuitively, one would expect that the brightest images are recorded using 200 fs pulse with the highest pulse energy $E_{p}=1.5\,\mathrm{mJ}$ which corresponds to the highest $I_{ph}$ (panel b). In fact, the most intense X-ray diffraction snapshots were taken at $h\nu=1500\,\mathrm{eV}$ with few femtosecond pulses and only $E_{p}=0.12\,\mathrm{mJ}$ (panel c), (<ref>). The sub-fs FEL pulse duration outruns most damage mechanisms and thus, serves as reference measurement recorded with $E_{p}=0.02\,\mathrm{mJ}$ (panel a). The brightness of the lower half of the images is linearly scaled by their respective pulse energies relative to the sub-fs FEL reference . The 200-fs exposure is 50 times dimmer than linear scaling predicts which indicates detrimental bleaching. Surprisingly, the 5-fs snapshot is almost 10 times brighter than the normalized sub-fs image which suggests a non-linear increase in scattering efficiency.

A statistical analysis of the scattering cross section $\sigma_{exp}$ reflected in thousands of recorded images supports the hypothesis that X-ray diffraction from excited ions can be both, detrimental or beneficial to the scattering cross section. This data overview illuminates the full extent of bleaching in 200-fs snapshots and the enhancement of $\sigma_{exp}$ in diffraction patterns recorded with sub-fs and few-fs pulses as summarized on the right size in <ref>. We calculated $\sigma_{exp}$ per Xe atom for the top 5 % brightest images for each incoming X-ray photon energy scan step as demonstrated in <ref>, left panels. Each dot represents a measured diffraction image of a single Xe nanoparticle which is sufficiently bright for an automated nanoparticle size fitting routine (see Methods and Supplemental Material). The individual value for $\sigma_{exp}$ can be directly deduced from the image brightness corrected for the exposure intensity $I_{ph}$ and the nanoparticle size. We determined the individual $I_{ph}$ based on a calibration correlating the M-shell fluorescence yield recorded parasitically by the pnCCD and the pulse energy values reported by the gas detector (see Supplements).

The corresponding literature values for $\sigma_{scat}$ for the neutral Xe atom are visualised by the dashed line <cit.> (see Supplements). For all pulse durations and pulse energies below 1.5 mJ the $\sigma_{exp}$ values follow closely the literature Xe values near the 3d resonance ($h\nu < 720\,\mathrm{eV}$). Two major tendencies deviating from the neutral Xe case emerge from the analysis. First, for all three pulse durations, conditions exist when $\sigma_{exp}$ significantly exceed the Xe literature value for the corresponding photon energy above 720 eV. At $h\nu=1500\,$eV and 5-10 fs pulse duration (red dots), the enhancement is 10 times higher than any point on the dotted Xe literature value curve. Second, $\sigma_{exp}$ extracted from images recorded with 200-fs and $E_{p}=1.5$ mJ pulses (blue dots) are overall 10 times lower than Xe literature values.

A correlation between the $\sigma_{exp}$ and the number of photons absorbed per atom disentangles the complex interplay between photo-absorption, transient ion states and ultimately, structural damage of the sample. In the right panel of <ref> the number of scattered photons corrected for the wavelength and particles size is plotted vs the M-shell fluorescence yield per atom Calculation of fluorescence photons per atom. Both values are extracted from individual snapshots recorded at photon energies above 720 eV.  The M-shell fluorescence yield per neutral Xe atom after a single photoabsorption event is only about 0.365 %<cit.> which is marked as the dotted grey line. Higher fluorescence yield values indicate that multiple photons were absorbed. The number of scattered and absorbed photons depends on $I_{ph}$  which fluctuates mostly because of the random nanoparticle´s position within the FEL focal volume intensity distribution <cit.>. Overall, the number of scattered photons increases with $I_{ph}$  in parallel with the fluorescence yield per atom and the highest yields stem from the FEL focus center.

The correlation between scattering and fluorescence reflects accelerated ionic structure damage during intense 200 fs pulses, but also non-linear increase the elastic scattering signal on short sub fs to 10 fs short time scales. First, the images, which are recorded with 200 fs and 1.5 mJ FEL pulses exhibit a saturation behavior where scattering efficiency stagnates with increasing fluorescence (blue dots). This is a clear signature of structural damage of the specimen as demonstrated by previous studies <cit.>. The scattering efficiency of the entire nanoparticle depends on the ion density which decreases dramatically during the onset of a hydrodynamic expansion . The fluorescence efficiency is less dependent on ion density and individual ions continue to absorb X-rays similarly to the ones inside the intact sample.

Second, the high fluorescence yield of of the brightest images with enhanced $\sigma_{exp}$ suggests that one or more X-ray photons per atom were absorbed during the FEL exposure. Such high ionization levels within the sample promote the role of transient form factor changes as the probability that X-rays are scattered off an ion with a core-hole rather than a neutral atom increases. This effect is very pronounced in diffraction images recorded with 1500 eV and 5-10 fs FEL pulses where the highest enhancement of $\sigma_{exp}$ was observed. In the brightest shots, the fluorescence yield increases by two orders of magnitude indicating very high Xe charge states during the FEL exposure.  Conversely,  $\sigma_{exp}$ is similar to neutral Xe $\sigma_{scat}$ in diffraction patterns with low levels of fluorescence recorded with weaker 5 fs pulses at 730 eV (light blue dots, lowerst panel).

Our simulation <cit.>  of the corresponding $\sigma_{exp}$ (solid line, left panels, which  is in good agreement with our measurements, attributes trends mentioned above to transient resonances <ref>. For 200 fs FEL exposures with $E_{p}=1.5$ mJ pulses, our calculation predicts a significant lowering of the scattering cross section because of sample´s rapid disintegration partially fuelled by transient resonances <ref>. The presence of transient resonances above the 3d absorption edge for shorter and/or longer but weaker pulses is also supported by our calculation. If the sample was exposed to attenuated 200 fs pulses, the hydrodynamic expansion occurs much slower and thus, the benefits of TR reappear. Interestingly, the simulation underestimates the non-linear scattering enhancement at $h\nu=1500$ eV. One possible reason is that our simulation neglects ionisation potential suppression <cit.> which can rapidly delocalise the valence electron shells and lead to extremely efficient transient resonance cascades<cit.>. Assuming that Xe $n=5$ and $n=4$ shells are fully removed, our simulation predicts $\sigma_{scat}^*$ up to 9 times the neutral Xe cross section for 5-10 fs FEL pulses at $h\nu=1500\,eV$. An indirect support for a significant role of complex nanoplasma ionization effects stems from coincident ion spectra measurement which witness extreme high and energetic ions in the brightest shots recorded with 1500 eV pulses (see Supplements).

Overall, our benchmark study illuminates the potential of the little explored transient resonances in ultrafast X-ray CDI. In essence, we demonstrate that transient resonances can significantly increase the brightness of X-ray diffraction images if FEL pulses are shorter than the onset of the ionic structure damage. We observed the enhancement effect across at least one order of magnitude in FEL intensity for pulse durations < 10 fs. This data and our simulations indicate that the effect is scalable with FEL pulse energy as subsequent photoionisation events can drive the ions into a resonant cascade similar to REXMI <cit.> and some resonances enhance diffraction by factors $>10^4$ (supplement <ref>). The brightest images recorded here with 1500 eV photons (0.7 nm wavelength) reflect consistent elastic scattering levels down to 5 nm full period spatial resolution which is to our knowledge the best result for a single exposure ultrafast soft X-ray image of a nanoscale object (<ref>, upper right panel). In principle, TRs should also exist in the hard X-ray regime which offers a direct route to sub-nm resolution. Beyond that, TRs are element specific and thus could increase material contrast in X-ray images and potentially eliminate the need of heavy stain atoms in time-resolved multi-wavelength anomalous crystallography studies.
In principle, transient resonances can be created by an optical pre-pulse and significantly increase signal-to-noise ratio in state-of-art ultrafast table-top XUV imaging setups such as <cit.>.

Our study emphasizes the significance of intense and short FEL pulses which have received little attention so far in CDI, but experience a rapid development in accelerator science <cit.> . Newly available intense sub-fs FEL pulses can become a significant driver for ultrafast CDI as relaxation processes such as Auger decays of K- and L-shells happen mostly within hundreds of attoseconds. In our study, we have demonstrated sub-fs X-ray CDI within a single FEL exposure and also, that transient resonances can increase the brightness of images on such short time scales. Our results pave the way for a simulation guided systematic improvement of ultrafast CDI based on non-linear effects, which has the potential to combine atomic resolution with attosecond temporal precision.

The concept of transient resonances: In (a, top part), the Coulomb potential is plotted versus the distance from the charged core for a neutral Xe atom (gray dotted line, right side) and for a core excited Xe+$^*$ (gray solid line, left side). The corresponding 3d (blue) and 4f orbitals (orange)  are displayed for a neutral Xe atom (left, dashed lines) and 3d$^*$ and 4f$^*$ excited Xe ion with a core-hole (right, solid lines). First, the core-hole excitation shifts the binding energy of the remaining 3d$^*$ electrons from $h\nu_1$ (black) to greater $h\nu_2^*$ (red) due to a modified Coulomb potential (a, bottom, right, solid grey line). Second, the core-hole excitation also rearranges the orbitals to 3d$^*$ (blue) and 4f$^*$ (orange). Due to the core-hole induced charge imbalance the 4f$^*$ orbital is pulled closer to the atom's center by almost two orders of magnitude creating a strongly increased overlap with the 3d$^*$ wave function and hence an increased transition dipole strength for the 3d$^*~\rightarrow~\text{4f}^*$ transition. This has dramatic consequences for the scattering cross section in the vicinity of the Xe 3d absorption edge. In (b), the scattering cross section $\sigma_{scat}$ for the neutral Xe (dashed black line) and $\sigma_{scat}^*$ for the excited Xe+$^*$ (red solid line) is plotted vs the incoming X-ray photon energy. The excited atom Xe$+^*$ scatters two orders more strongly than neutral Xe at the shifted resonance position $h\nu_2^*$ and almost two orders more compared to the neutral Xe resonance maximum $h\nu_1$. Energies, cross-sections and radial wave functions displayed were calculated using Hartree-Fock simulations Simulations.

at (0,-1.4) ;
[color=pulse] plot[domain=-0.5:0.5, samples=20, smooth] (, 0.3*exp(-500**)) + 6.5) – cycle;
[->, -triangle 45,color=pulse] (-0.3, 6.5) – (0.7,6.5);
[align=left] at (0.9, +0.8 + 6.5) <1 fs;

at (1.3, 6.5) ;

[color=pulse] plot[domain=-0.9:0.9, samples=20, smooth] (, 1.5*exp(-12**)) + 3.5) – cycle;
[->, color=pulse, -triangle 45] (-0.7, 3.5) – (1.0, 3.5);
[align=left, fill=white, fill opacity=0.0, text opacity=1] at (0.9, +0.8 + 3.5) 200 fs;
[color=pulse, opacity=0.3, overlay, path fading=east] (1.3, 3.5) – (2.9, 5) – (2.9, 2.3) – cycle;
at (1.3, 3.5) ;
[anchor=north] at (0,3.5) XFEL;

[color=pulse] plot[domain=-0.5:0.5, samples=20, smooth] (, 0.5*exp(-70**)) + 0.5) – cycle;
[->, color=pulse, -triangle 45] (-0.4, 0.5) – (0.7, 0.5);
[align=left, fill=white, fill opacity=0.75, text opacity=1] at (.9, 0.8 + 0.5) 5 fs;

at (1.3, 0.5) ;

The brightest X-ray diffraction patterns of individual Xe nanoparticles with diameters 97$\pm$3 nm are displayed for sub-fs (a), 200 fs (b) and 5-10 fs (c) pulse durations on the left side in the top part of the square. The  sub-fs image was recorded with a $E_{p}=0.02$ mJ pulse energy at $h\nu=735$ eV X-ray photon energy, the 200 fs with  $E_{p}=1.5$ mJ at $h\nu=730$ eV, the 5 fs  $E_{p}= 0.1$ mJ pulse energy at $h\nu=1500$ eV. The corresponding one dimensional radial profiles vs the scattering wave vector values $q$ are shown on the right side. The measured radial profiles are compared with particle size-fitted diffraction patterns of ideal spheres (grey). The brightness of the 200 fs and 5 fs diffraction patterns are normalized by the the incoming pulse energies difference relative to the sub-fs snapshot and displayed in the bottom part of the of the square. According to linear scaling with incoming X-ray pulse energy one expects that the brightest X-ray diffraction snapshots can be observed from 1.5 mJ, 200 fs FEL pulses ((b),dark blue). In contrast, we find the the diffraction patterns which were recorded with only 0.1 mJ and 5 fs short pulses are the absolut brightest. We attribute the increased brightness to transient resonances. Diffraction signal levels down to 5 nm resolution are visible despite noise from fluorescence in (c) and the overall radial profile follows closely the theoretical calculation for diffraction from a solid sphere.
<cit.>. See Single exposure images for the corresponding full detector images.

[color=orange!90!black] at (-4.3, 8.6) $E_{p}=0.03\mathrm{mJ}$;
[color=purple!50!black] at (-4.3,5.8) $E_{p}=0.02\mathrm{mJ}$;
[color=blue!50!black] at (-1.7, 4.0) $E_{p}=1.5\mathrm{mJ}$;
[color=royalblue!90!black] at (-4.2, 2.9) $E_{p}=0.01\mathrm{mJ}$;
[color=red!80!black] at (-1.7, 2.9) $E_{p}=0.1\mathrm{mJ}$;

at (0,-1.4) ;
[color=pulse] plot[domain=-0.5:0.5, samples=20, smooth] (, 0.5*exp(-250**)) + 6.2) – cycle;
[align=center] at (0, 6.2 -0.3) <1 fs;

[color=pulse] plot[domain=-1:1, samples=20, smooth] (, 1.5*exp(-12**)) + 3.0) – cycle;
[align=center, fill=white, fill opacity=0.0, text opacity=1] at (0, + 3.0 - 0.3) 200 fs;

[color=pulse] plot[domain=-0.5:0.5, samples=20, smooth] (, 0.5*exp(-70**)) + 0.3) – cycle;
[align=center, text opacity=1] at (0, 0.3 -0.3) 5 fs;

[color=orange!90!black] at (-4.8, 8.6) $h\nu=735\,\mathrm{eV}$;
[color=purple!50!black] at (-4.8, 5.8) $h\nu=730\,\mathrm{eV}$;
[color=blue!50!black] at (-1.9, 4.5) $h\nu=730\,\mathrm{eV}$;
[color=royalblue!90!black] at (-4.8, 3) $h\nu=730\,\mathrm{eV}$;
[color=red!80!black] at (-1.5, 1.3) $h\nu=1500\,\mathrm{eV}$;

The left side depicts the measured $\sigma_{exp}$ in dependence to the incoming X-ray photon energy $h\nu$ for all pulse duration measurements with average pulse energy $E_p$. The gray dashed line indicates the neutral Xe $\sigma$ for comparison. Our calculations (solid lines) agree overall well with the experiment. The strongest enhancement can be found at 1500 eV (red) where TR cascades have been observed in the past in Xe atoms <cit.>. We analysed all photon energy scan steps with enhanced $\sigma_{exp}$ as a correlation between scattering and absorption efficiency (represented by fluorescence yield per atom). The measured fluorescence yield per atom is plotted vs the X-ray scattering efficiency for Xe clusters on the right side. Both parameters are corrected for effects from the cluster radius $r$ and X-ray wavelength $\lambda$(see Methods and Supplements for more details). The gray dashed line corresponds to tabulated Xe M-shell fluorescence yield 0.00365<cit.>. Each dot in the graph represents a single cluster observed by a single FEL exposure. The point spread stems from the fact that the nanoparticle diameters 60-150 nm are much smaller than the FEL focus average full width half maximum (FWHM) 1.5 $\mu m$. Each randomly injected sample experiences a different exposure FEL intensity inside the FEL focus and only the top few percent of all hits with the highest fluorescence/scattering yields must have been recorded near the FEL focus center with the highest intensities.

§ SUPPLEMENTS

§.§ Simulation

We employed  Monte-Carlo/Molecular-Dynamics (MC/MD) calculations to simulate the scattering cross sections of the Xe clusters <cit.> to model the full electron and nuclear dynamics in an atomistic manner during the full duration of the X-ray pulse. In more detail, the interaction of the atom with incident XFEL pulse is treated quantum mechanically with a Monte Carlo method by tracking explicitly the time-dependent quantum transition probability between different electronic configurations. The total transition rate, $\Gamma$, between different electronic configurations $I$ and $J$ is given by

\begin{equation}
\Gamma_{I,J} = \Gamma^{P}_{I,J}+\Gamma^{A}_{I,J}+\Gamma^{F}_{I,J}+\Gamma^{RE}_{I,J}+\Gamma^{EI}_{I,J}+\Gamma^{RC}_{I,J}+\Gamma^{SE}_{I,J}.
\end{equation}

Starting from the ground state of the neutral atom, we include the contribution from photoionization $\Gamma^{P}_{I,J}$, Auger decay $\Gamma^{A}_{I,J}$, fluorescence $\Gamma^{F}_{I,J}$, resonant excitation $\Gamma^{RE}_{I,J}$, electron-impact ionization $\Gamma^{EI}_{I,J}$, electron-ion recombination $\Gamma^{RC}_{I,J}$ and stimulated emission $\Gamma^{SE}_{I,J}$.  The cross sections and rates are calculated with Hartree-Fock-Slater model <cit.> with relativistic corrections and spin-orbit coupling in orbital energies, following the procedure outlined in reference <cit.>.  Additionally, a molecular dynamics (MD) algorithm is used to propagate all particle trajectories (atoms/ions/electrons) forward in time in 1 attosecond steps. The cluster dynamics includes electromagnetic forces between the charged particles and van der waal forces among the neutral atoms.

The importance of understanding transient dynamics is that the incoming photons arriving at different times will scatter off the instantaneously populated transient states.
Similar to the treatment presented in <cit.>, the observed scattering response is characterized as a sum of the instantaneous scattering patterns weighted by the pulse intensity, $j_X(\tau,t)$, with FWHM duration $\tau$ and convolved with a Gaussian bandwidth profile, $g(\omega,\omega_x)$, with a central photon energy of $\omega_x$, such that

\begin{eqnarray}
\label{eq:npSCS}
\frac{d  \sigma}{d\Omega}(\Vec{q}) =
\frac{d\sigma_{\textrm{th}}}{d\Omega} \frac{1}{\mathscr{F}} \int_{0}^{+\infty}\!\! d\omega \int_{-\infty}^{+\infty}\!\! dt  g(\omega,\omega_x) j_X(\tau,t) |F_{c}(\Vec{q},t)|^2,
\end{eqnarray}

where $d\sigma_{\textrm{th}}/d\Omega$ is the Thomson scattering cross section.

\begin{equation}
\mathscr{F} = \int_{0}^{+\infty}\!\! d\omega \int_{-\infty}^{+\infty}\!\! dt  j_X(\tau, t) g(\omega,\omega_x)
\end{equation}

is the fluence of an XFEL pulse, and $\int_{0}^{+\infty}\!\! d\omega(\omega,\omega_x) = 1$ . Here $F_{c}(\Vec{q},t)$ is the time-dependent form factor of the target cluster and is given by

\begin{equation}
\label{eq:npFormFactor}
F_{c}(\Vec{q},t)=\sum_{j=1}^{N_a} f_j(\Vec{q},C_j(t))e^{i \Vec{q} \cdot \Vec{R}_j(t)} + \sum_{j=1}^{N_e(t)} e^{i \Vec{q} \cdot \Vec{r}_j(t)}\, ,
\end{equation}

where $N_a$ is the total number of atoms/ions, $\Vec{R}_j(t)$, $C_j(t)$ and $f_j(\Vec{q},C_j(t))$ are the position, the electronic configuration and the atomic form factor of the $j$-th atom/ion respectively.  $N_e(t)$ is the number of delocalized electrons within the focal region of the X-ray pulse and $\Vec{r}_j(t)$ are their positions.

To simulate the scattering cross section of atomic xenon, we used the Monte-Carlo rate equation <cit.>.  We explicitly track the time-dependent quantum transition probability between different electronic configurations in atoms exposed to X-ray pulse. The total transition rate, $\Gamma$, between different electronic configurations $I$ and $J$ is same as that used in MC/MD calculation, except $\Gamma^{EI}_{I,J}$ and $\Gamma^{RC}_{I,J}$ are set to zero.

§.§ Simulation Results

At the beginning of the simulation, neutral atoms interact through a Lennard Jones potential.
X-ray photoionisation and Auger processes produce ions and free electrons, adding Coulombic forces to the cluster.
These electrons in turn trigger collisional ionization which rapidly becomes the dominant ionization process. The delocalized but trapped electrons heat up the cluster from the inside.
This process peaks around $-100$ fs together with the acceleration of the xenon ions as seen in <ref>.
In turn the cluster expands well before the maximum of the XFEL pulse arrives.
The simulation results in <ref> are based on the same method and additionally integrated the scattering cross section over all xenon atoms and the entire exposure time.

We also simulated the ionic scattering cross sections for individual electronic configurations of the Xe ions (<ref>).
For simplicity, an electronic configuration is represented by the number of removed valence electrons (x-axis) and the number of removed inner shell (3d) electrons (y-axis). The colorscale displays the change of the scattering cross section relative to neutral Xe. Some configurations are exceeding factor $10^5$ enhancement of the scattering cross section compared to neutral Xenon. In some regions of <ref>, clustering of multiple strong TRs indicate that the system can stay resonant during multiple absorption events.
At an incident photon energy $h\nu=735\,\mathrm{eV}$, enhancement is already possible for relatively low charge states below 15.
At $h\nu=1500\,\mathrm{eV}$, very high charge states around 25 are required and show significant enhancement of $\sigma^*$ of up to factor $10^4$.
Those very high ion charge states are consistent with the measurement in our experiment.
A photon energy of 1000 eV shows the greatest enhancement.
In future research, such calculations can be used to identify and target specific electronic configurations and FEL pulse parameters. In the ideal case, one would identify regions with multiple TRs which form a cascade towards higher charge states. This way brightness enhancement can be scaled in combination with high peak power densities and short pulses.

Simulation of Xe cluster expansion due to XFEL irradiation with a 200 fs pulse: The cluster's size is measured by the standard deviation of all particle positions within the simulation and the ion acceleration is its second derivative. The acceleration peaks around $-100$ fs, where the ionization rate also has a maximum due to collisional ionization (not shown).

Resonance maps for specific electronic states of Xenon: For a number of removed valence electrons (x-axis) and a number of removed inner shell (3d) electrons (y-axis), the colorscale shows the scattering cross section relative to the neutral Xe cross section. At a photon energy $h\nu=735\,\mathrm{eV}$ enhancement already sets in for low charge states, while at 1500 eV higher charge states are required for enhancement. The simulations suggest that a single charge state can scatter up to a factor $10^4$ more than the neutral Xenon at 1500 eV. At 1000 eV an enhancement of up to $10^5$ has been calculated for specific charge states.

§.§ Experimental Setup

Schematic of the experimental setup at the AMO Hutch at LCLS: Intense X-ray FEL pulses were focused and intersected with a stream of Xe clusters. The resulting single- shot single-particle X-ray diffraction patterns were recorded using pnCCD detectors positioned further downstream of the interaction point. The front pnccd is positioned in a distance of 130 mm and the rear pnccd at 732 mm from the X-ray focus. The outer regions of the front pnccd, where the diffraction signal has vanished still register single fluorescence photons.

A schematic of our experiment is exhibited in <ref>: Individual Xe nanoparticles with diameters 40-150 nanometers intersect the path of the focused and intense single X-ray FEL pulses at the LAMP endstation at the Linac Coherent Light Source (LCLS) <cit.>. Single particle, single exposure snapshots were recorded using a p-n junction charge coupled devices (pnCCDs)<cit.> located at two different positions further downstream from the interaction region. The particle size is encoded with $\pm 0.3$ nm precision into the Airy pattern-like diffraction Cluster size fitting model. Single-exposure radial diffraction profiles collected by the rear and front detectors are in agreement with theoretical plots for X-ray diffraction by a perfect sphere within Born approximation <cit.>. The deviations from a perfect sphere can be mostly attributed to sharp facets near the surface.

The experiment was conducted at the AMO hutch of the LCLS light source at SLAC National Laboratory in the US. Xenon nanoclusters were injected into the focal region of the X-ray beam (see <ref>). A pnCCD detector was positioned 130 mm downstream of the interaction point thus called the front pnCCD Another, the rear pnccd, was positioned at a distance of 732 mm downstream the interaction point. The Xe cluster density was adjusted to record diffraction patterns of single Xe nanoclusters only. As those clusters are almost perfect spheres their size can be reconstructed with high precision. The number of scattered photons on the detector and the exact size of the cluster combined allow to calculate the scattering cross section of a single Xe atom. See Cluster size fitting model for details. This step is of crucial importance for the analysis as it allows us to correct the scattering for the cluster size in each XFEL pulse and thus calculate the scattering cross section.

The XFEL focal spot of  1.5 $\mu$m (FWHM) is over one order of magnitude wider than the nanoparticles and thus, each nanoparticle is exposed to a different but uniform power density. Based on statistical considerations one can assume that brightest 0.1 % of all shots were recorded close to the FEL focus center. The absolute exposure power density in the focus center has been calibrated by independently measured Argon atomic spectra and cross checked with beam line characteristics.

name     color     $\tau$ [fs]     Energy [mJ]     Fluence [$\mu \mathrm{J}/\mu \mathrm{m}^2$]     Photon Energy

XLEAP     orange     <1     0.03     $0.2\pm 0.1$      Xe M-edge

200fsfull     dark blue     200     1.5     $12\pm 2$     Xe M-edge

200fsatt     purple     200     0.02     $0.16\pm 0.02$      Xe M-edge

5fs     light blue     5     0.01     $0.08\pm 0.03$     Xe M-edge

1500 eV     red     5     0.1     $0.8\pm 0.3$     1500 eV

Summarized experimental conditions with color coding used throughout the publication. The fluence is shown in average values over each dataset and $\pm$ values indicate the stability at a single photon energy. The underlying data is the pulse energy measured by the gas detectors.

While recording these diffraction images, we systematically scanned the photon energy around the Xenon M-shell absorption edge ($\sim$700 eV).
Three different pulse durations were used throughout the experiment:

1) 200 fs duration,

2) 5 fs pulse duration by inserting a slotted foil<cit.> and

3) the recently developed XLEAP<cit.> mode delivering sub-fs pulses.

For each setting, the attenuation was adjusted to keep the photon number constant in each X-ray pulse, all the parameters are summarized in <ref>
Inside the high-vacuum chamber the X-ray beam was focused down to a size of $\sim 1.5\mu m$ (FWHM) in diameter using the existing KB-mirrors of the AMO endstation. The beamline transmission was measured to be 0.2 around 700 eV and 0.4 around 1500 eV.

The Xe clusters were formed by supersonic expansion of xenon at 9 bar backing pressurethrough a 200 $\mu$m conical nozzle with a half-opening angle of 4$^\circ$ cooled to 245 K. The pulsed cluster jet was skimmed twice. An additional piezo-driven slit skimmer right before the interaction region was adjusted such that, on average, less than one particle was in the FEL focus.

§.§ Cluster size fitting model

We analyzed single diffraction snapshots of individual clusters and  fitted the corresponding diffraction radial profile depending on the cluster size. As clusters are mostly spherical, we choose the analytical diffraction pattern of a hard sphere as our working model <cit.>. The adjustable parameters of the aforementioned  fit determine the particle size (namely its radius $R$) and the brightness of the recorded diffraction image encoded in the form of the parameter $I_0$. We extracted the absolute scattering cross section from a single image by combining both fit parameters with the calibrated X-ray exposure intensity values (last section, Supplements).

The one-dimensional plot of the X-ray diffraction patterns from a solid sphere is given by and displayed in <ref> (top, blue line):

\begin{align}
I(\theta) = I_0\cdot\frac{9}{x^2} \left(\frac{\sin(x)}{x^2} - \frac{\cos(x)}{x}\right)^2
\end{align}

with $x=kR\sin\theta = \frac{2\pi}{\lambda}\cdot R \cdot \sin\theta$
and the sphere's radius $R$. The fitting route starts with a reasonable estimate for $I_0$ and $R$. This is particularly important for the parameter $R$, as the fitting routine may otherwise converge to a local minimum. For the numerical calculations, it is much more practical to write $x=kR\sin\theta$ as $x=4.493 \cdot \frac{x_\text{pxl}}{x_1}$ where $x_\text{pxl}$ is the x-value in pixel on the detector and $x_1$ is the pixel number of the first minimum of the function $I(\theta)$. The number 4.493 is the position of the first minimum of $I(\theta)$ as seen in <ref> and was determined numerically.

Any given individually measured single shot diffraction image is first preprocessed by masking invalid detector regions and over-exposed pixels. A radial profile of the remaining image is calculated, which represents the measured $I(\theta)$. A peak finder will mark the local maxima and minima, which corresponds to the green and orange positions in <ref>. As long as the diffraction pattern is clearly visible, maxima and minima will be alternating. As soon as the signal vanishes in noise, however, the peak finding will fail to identify the peak positions correctly and multiple maxima or minima will directly follow each other. At that point any further peaks will be deemed invalid. A straight line will be fitted to all valid peak positions (black dashed in <ref>). The slope of that line is characteristic for the distance between minima and maxima and thus characteristic for the size $R$ of the particle. The slope is used to calculate the estimate for $R$, that is required as a starting value to fit $I(\theta)$ to the measured $I(\theta)$. Please note that a bias of this estimate is tolerable as the fit will converge towards the measured shape of $I(\theta)$.

The diffraction pattern of a solid sphere $I(\theta)$ is shown on the top. The green (orange) lines mark the minima (maxima) of the this function. The fact that maxima and minima are almost equally spaced is used to estimate their spacing and thus estimate the particle radius $R$. This estimated value is then used as a starting value for fitting the analytical diffraction pattern $I(\theta)$ to the measured one and thus determine $R$ as well as $I_0$. This is performed separately for every measured single shot diffraction pattern in the experiment.

In a subsequent step the total number of scattered photons $N_\text{scat}$ is calculated from the values $R$ and $I_0$ by integration over the diffraction pattern.

§.§ Calculation of the scattering cross section

Combining the estimated fluence and the parameters $R$ and $N_\text{scat}$ (calculated from $R$ and $I_0$, see cluster size fitting model) allows us to calculate the scattering cross section of the Xe nanocluster $\sigma_\text{sphere}$ and, subsequently, the scattering cross section of an individual Xe atom $\sigma_\text{scat}$.

Scattering of an individual atom is given by<cit.>

\begin{align}
\sigma_\text{scat} = \frac{8}{3}\pi r_e^2 |f|^2
\end{align}

A nanocluster consisting of multiple atoms has a much larger scattering which is given by the coherent sum of all contributing atoms (Eq. 30<cit.>):

\begin{align}
\sigma_\text{sphere} &= 2\pi r_e^2 \lambda^2 R^4 \rho^2 |(f_1 + if_2)|^2 \\
&= \underbrace{\frac{9}{16\pi} \lambda^2 R \rho}_{=:X_\text{sphere}} \cdot N_\text{atoms} \cdot \sigma_\text{scat}
\end{align}

where $r_e$ is the classical electron radius, $\lambda$ the incident wavelength, $R$ the radius of the nanocluster, $\rho$ the particle density of the nanocluster and $f_1$ and $f_2$ are the real and imaginary part of the atomic scattering factor.
For simplicity, the terms are rearranged such that $X_\text{sphere}$ is the factor by which a nanocluster scatters more than the incoherent sum of all its atoms.

Now, the total radiated energy $E_\text{scatt}$ can be related to the incident fluence $F$. By definition

\begin{align}
E_\text{scat} = \sigma_\text{sphere} \cdot F
\end{align}

and the atomic scattering cross section $\sigma_\text{scat}$ can be calculated from the measurement via

\begin{align}
\sigma_\text{scat} = \frac{E_\text{scat}}{N_\text{atoms} X_\text{sphere} F}
\end{align}

with $N_\text{atoms}$ as the total number of Xe atoms in the nanocluster. This relation is used in the data analysis to calculate the atomic scattering cross section of Xe. The number of Xe atoms in the cluster $N_\text{atoms}$ is calculated by multiplying the volume of the cluster and the number density of solid Xenon:  $N_\text{atoms} = \rho_\text{Xe} \frac{4}{3} \pi R^3$ with $\rho_\text{Xe} = 1.78\cdot 10^{28} \frac{\text{atoms}}{{m^3}}$ <cit.>

(footnote: In the 5 fs 3d edge run we could in principle estimate the FEL exposure power density for each hit based on the fluorescence yield, but this may be misleading out of consistency considerations as other runs are more dominated by TRs and the fluorescence yield changes substantially)

§.§ Single exposure images

<ref> shows the detector images corresponding to radial profiles shown in <ref>. The images are combined from the rear pnccd around the beam axis, covering angles from -60 to 60 mrad and the front pnccd half detector covering angles from 110 mrad and beyond. In the experiment (compare <ref>a) the rear pnccd was a factor 5.7 further away from the xray focus than the front pnccd. At all experimental conditions the diffraction image of the Xe cluster clearly extends to the region covered by the front pnccd. The clusters shown here are of almost identical size. First note, that and the diffraction images taken with 200 fs and XLEAP (<0.5 fs) look almost identical although the 200 fs pulse carried about 60 times more energy! At the lower left image (1500 eV) the front pnccd was adjusted slightly further from the beam axis resulting in a larger gap between the detectors, visible in <ref> and <ref>c.

Further, the high fluorescence levels are clearly visible at the lower left image. It was taken at 1500 eV photon energy, which is why the diffraction ring spacing changed, while the cluster size stayed the same. The region marked by the red box was used to evaluate the fluorescence yield, see Calculation of fluorescence photons per atom.

Single shot images for the same conditions as shown in <ref>: The top image is for the 200 fs pulse, lower left was taken at 5 fs at 1500 eV and lower right image is for XLEAP conditions (<0.5 fs). The image combines the data of the front and the rear pnCCD. The single photons are clearly visible in the images. Please note, that a single photon appears smaller on the rear detector compared to the front detector as each pixel spans a much smaller solid angle. All three particles are of very similar size. The lower left image shows faster diffraction rings because the incident photon energy is 1500 eV compared to $\sim$700 eV for the other two. The red rectangle indicates the region which has been used to evaluate the fluorescence yield.

§.§ Calculation of fluorescence photons per atom

In contrast to previous studies, which relied on focal averaged Ar gas measurements <cit.>, we exploit the fluorescence yield of single moderately bright images for absolute X-ray exposure intensity calibration.
The comparison between the fluorescence yield from the moderate 5 fs measurement (light blue dots) and the M-shell fluorescence yield literature value pointed out as a dashed grey line in <ref> a) suggests that in this run only up to about 0.3-0.4 X-ray photons/atom were absorbed.
TRs play little role if the majority of atoms remain neutral during the FEL exposure and thus, the absolute fluorescence yield is proportional to the exposure FEL power density.
Fluorescence photons were detected as single photon hits on the pnCCD detectors.
The fluorescence photons per atom (shown in <ref>) are calculated from an outer region of the front pnCCD by summing up all pixels above a threshold corresponding to 125eV.
This outer region (marked as a red rectangle in <ref>) is more than 300 mrad from the beam axis, ensuring that even the brightest diffraction patterns have no signal at those large angels and consequently only the fluorescence is measured.
The energy deposited on the detector corner is then multiplied by a factor to scale this number to the energy emitted into $4\pi$ assuming isotropically emitted fluorescence and a correction for the quantum efficiency of the pnccds.
It is further divided by the number of atoms in the cluster, which finally yields the “fluorescence photons per atom” as shown in <ref>.

§.§ Calibration of incoming X-ray photon energy

An time of flight (tof) spectrum of gaseous Xe was measured, in order to calibrate to an absolute photon energy. <ref> shows  the Xe$^{4+}$ ion yield for different photon energies and compares it to a literature absorption measurement<cit.>. The double peak structure is a result of the resonance ionization of the Xe 3d$_{\frac{3}{2}}$ and 3d$_{\frac{5}{2}}$ energy levels.
The comparison of the peaks positions with the literature values displays a shift of the incoming XFEL photon energy by only 0.8 eV and was therefore not compensated in the data.

Calibration of the incoming photon energy: the literature values (black) are taken from <cit.>. The peak positions of our measurement and the literature values are only 0.8 eV apart. This difference was therefore not correct in any other data shown in this publication.

[0]

§ ACKNOWLEDGEMENTS

Use of the Linac Coherent Light Source (LCLS), SLAC National Accelerator Laboratory, is supported by the U.S. Department of Energy (DOE), Office of Science, Office of Basic Energy Sciences (BES) under Contract No. DE-AC02-76SF00515. S.K. and T.G. were supported by the U.S. DOE BES Chemical Sciences, Geosciences and Biosciences Division through the Panofsky fellowship from SLAC National Laboratory. PJH and LY were supported by the U.S. DOE BES Chemical Sciences, Geosciences and Biosciences Division under Contract No. DE-AC02- 06CH11357. F.Z.and M.R.W were supported by the U.S. DOE BES Chemical Sciences, Geosciences and Biosciences Division,  Chemical Sciences, Geosciences and Biosciences Division through the Early-Career Research Program project number 100482.

§ AUTHOR CONTRIBUTIONS STATEMENT

T.G. and A.M conceived the idea for the experiment based on discussions with C.B., J.D., J.P.MA., A.L., and A.M. developed and operated the XLEAP sub-fs mode. M.-F.L., X.L., K.N., J.W.A., and P.W. prepared the beam line for the experiment. The experimental setup was planned and performed by all authors. S.K. lead the data analysis. P.J.H performed the simulation of the experimental observations. S.K, P.J.H., and T.G. wrote the manuscript with input from all authors. All authors reviewed the manuscript.

§ ADDITIONAL INFORMATION

The authors declare no competing interests.