Loli Burgueño
email: lburguenoc@uoc.edu

Robert Clarisó
email: rclariso@uoc.edu

Shuai Li
email: shuai.li@cea.fr

Sébastien Gérard
email: sebastien.gerard@cea.fr

Jordi Cabot
email: jordi.cabot@icrea.cat

A NLP-based architecture for the autocompletion of partial domain models Exploratory paper

Keywords: domain model, autocomplete, modeling recommendations, assistant, natural language processing

Domain models capture the key concepts and relationships of a business domain. Typically, domain models are manually defined by software designers in the initial phases of a software development cycle, based on their interactions with the client and their own domain expertise. Given the key role of domain models in the quality of the final system, it is important that they properly reflect the reality of the business. To facilitate the definition of domain models and improve their quality, we propose to move towards a more assisted domain modeling building process where an NLP-based assistant will provide autocomplete suggestions for the partial model under construction based on the automatic analysis of the textual information available for the project (contextual knowledge) and/or its related business domain (general knowledge). The process will also take into account the feedback collected from the designer's interaction with the assistant. We have developed a proof-of-concept tool and have performed a preliminary evaluation that shows promising results.

Introduction

Domain modeling is the activity in which informal descriptions of a (business) domain are translated into a structured and unambiguous representation using a concrete (formal) notation. Domain models, also known as conceptual schemas [START_REF] Olivé | Conceptual modeling of information systems[END_REF], are built as part of a software development project to abstract the key concepts of the domain relevant for the project, leaving out superfluous details.

The use of domain models is widely extended and there is a broad variety of languages (UML, DSLs, ER, etc.), tools and methods [START_REF] Evans | Domain-driven design: tackling complexity in the heart of software[END_REF] that promote and facilitate their creation and manipulation. Nevertheless, they are typically created by hand during the analysis and design phases of software development, making their definition a crucial (but also time-consuming) task in the development life-cycle. On the other hand, the knowledge to be used as input to define such domain models is already (partially) captured in textual format in manuals, requirement documents, technical reports, transcripts of interviews, etc. provided by the different stakeholders in the project.

We believe we could exploit this information to assist designers defining domain models. In software development, autocompletion has been heavily studied for years. Mature features such as code autocompletion are integrated by default in IDEs and numerous benefits like faster coding, error prevention and the discovery of new language elements have been proven. Similarly, we propose model completion as a new feature for a future generation of modeling/design tools (i.e., intelligent modeling assistants [START_REF] Mussbacher | Opportunities in intelligent modeling assistance[END_REF]) that could significantly improve the domain modeling task.

A couple of commercial low-code platforms [30,26] and research efforts [START_REF] Sen | Towards domain-specific model editors with automatic model completion[END_REF][START_REF] Ganser | Engineering model recommender foundations[END_REF] are exploring model autocompletion but using other knowledge sources or techniques, e.g., the analysis of a collection of previously developed models from where patterns are extracted or ontologies [START_REF] Conesa | A method for pruning ontologies in the development of conceptual schemas of information systems[END_REF]. However, most companies do not have enough models to obtain meaningful results from the former, while the latter limits its suggestions to general knowledge sources. We believe that we can complement these approaches with autocompletions derived from contextual information in natural language documents. Other approaches [START_REF] Agt-Rickauer | Automated recommendation of related model elements for domain models[END_REF] have leveraged textual information in general data sources like Wikipedia to provide model suggestions. In contrast, in this paper, we propose combining information from different textual sources: documents generated around the project and general data sources (which include basic information that is omitted from the previous ones as it is supposed to be common knowledge in that community). Moreover, we also consider historic information about previously accepted or rejected suggestions.

More specifically, our goal is to assist the software designer by generating potential new model elements to add to the partial model she is already authoring. We believe this is more realistic than trying to generate full models out of the requirements documents in a fully automated way. In this exploratory paper, we propose a configurable framework that follows an iterative approach to help in the modeling process. It uses Natural Language Processing (NLP) techniques for the creation of word embeddings from text documents together with additional NLP tools for the morphological analysis and lemmatization of words. With this NLP support, we have designed a model recommendation engine that queries the NLP models and historical data about previous suggestions accepted or rejected by the designer and builds and suggests potential new domain model elements to add to the ongoing working domain model. Our first experiments show the potential of this line of work.

The rest of the paper is structured as follows. Sect. 2 describes our NLP-based architecture for model autocompletion. Sect. 3 describes the implementation details and Sect. 4 assesses the feasibility of the approach over an industrial case study. Section 5 presents the related work and Sect. 6, we conclude our work.

Approach

Our proposal aims to assist designers while they build their domain models. Given a partial domain model, our system is able to propose new model elements that seem relevant to the model-under-construction but are still missing. To provide meaningful suggestions, it relies on knowledge extracted out of textual documents. Two kinds of knowledge/sources are considered: general4 documents and contextual (all the specific information that we collect about the project) documents. We do not require these documents to follow any specific template.

General and contextual knowledge complement each other. The need for contextual knowledge is obvious and intuitive: designers appreciate suggestions coming from documents directly related to the project they are modeling. General knowledge is needed when there is no contextual knowledge or this is not enough to provide all meaningful suggestions (i.e., it may not cover all the aspects that have to be described in the domain model as some textual specifications omit aspects considered to be commonly understood by all parties). For instance, project documents may never explicitly state that users have a name since it is common sense and both concepts go hand-by-hand. Thus, general sources of knowledge fill the gaps in contextual knowledge and make this implicit knowledge explicit. Leveraging both types of knowledge to provide model autocomplete suggestions to the designer would significantly improve the quality and completeness of the specified domain models. As most common knowledge sources are available as some type of text documents (this is specially true for the contextual knowledge, embedded in the myriad of documents created during the initial discussions on the scope and features of any software project), we propose to use state-of-the-art NLP techniques to leverage this textual-based knowledge sources.

Methods such as GloVE [START_REF] Pennington | GloVe: Global vectors for word representation[END_REF], word2vec [START_REF] Mikolov | Distributed representations of words and phrases and their compositionality[END_REF], FastText [START_REF] Grave | Learning word vectors for 157 languages[END_REF], BERT [START_REF] Devlin | BERT: pre-training of deep bidirectional transformers for language understanding[END_REF] and GPT-3 [START_REF] Brown | Language models are few-shot learners[END_REF] create word embeddings (i.e., vectorial representations of words) that preserve certain semantic relationships among the words and about the context in which they usually appear. For instance, a NLP model5 trained with a general knowledge corpus is able to tell us that the concepts plane and airport are more closely related than plane and cat because they appear more frequently together. For example, the Stanford NLP Group's pretrained GloVe model with the Wikipedia corpus estimates that the relatedness (measured as the euclidean distance between vectors) between plane and airport is 6.94, while the distance between plane and cat is 9.04. Relatedness is measured by the frequency in which words appear closely together in a corpus of text. Apart from giving a quantifiable measure of relatedness between words, once an NLP model is trained, it enables us to make queries to obtain an ordered list with the closest words to a given word or set of words. This latter functionality is the one we use in our approach. Another advantage of these techniques is that they are able to deal with text documents regardless of whether they contain structured or unstructured data.

Our framework uses the lexical and semantic information provided by NLP learning algorithms and tools, together with the current state of the partial model and the historical data stored about the designer's interaction with the framework. As output, it provides recommendations for new model elements (classes, attributes and relationships). The main components of our configurable architecture as well as the process that it follows to generate autocompletion suggestions are depicted in Figure 1. The logic of the algorithm implemented for the recommendation engine is depicted using an UML Activity Diagram. We describe our framework architecture as well as all its steps in detail in the following, while Section 3 on tool support provides further technical details.

Step A: Initialization

Our process starts by preprocessing all the available documentation about the project to use it as input for the NLP training process. This step provides a corpus of text that satisfies the requirements imposed by the NLP algorithm chosen to create the NLP models, e.g., a single text file that contains words separated by spaces. For most NLP algorithms, this step consists of the basic NLP pipeline: tokenization, splitting, and stop-word removal.

Once all the natural language text has been preprocessed (i.e., the domain corpus is available), the NLP contextual model is trained. Note that we could use any of the NLP language encoding/embeddings alternatives mentioned before.

Instead, we do not train a NLP model for the general knowledge every time. Due to the availability of NLP models trained on very large text corpora of general knowledge data (such as Twitter, Wikipedia or Google News6 ), we propose to reuse them. Therefore, neither Step A.1 nor A.2 apply to the general knowledge. Nevertheless, if desired, the use of a pretrained model could be easily replaced by collecting general knowledge documents and executing Steps A.1 and A.2 with them.

Step B: Suggestion Generation

Step B.1. Model Slicing The input to this step is a partial domain model (e.g., a UML model). To optimize the results, we do not generate autocomplete suggestions using the full working model as input. Instead, we slice the model according to multiple (potentially overlapping) dimensions and generate suggestions for each slice. This generates a more varied style and a higher number of suggestions and enables the designer to also focus on the types of suggestions she is more interested in (e.g. attribute suggestions vs class suggestions).

The slicing patterns have been thoroughly designed taking into account the information and encoding of the NLP models to take full advantage of them. Each type of slice focuses on a specific type of suggestion. For instance, if we want to generate attribute suggestions, it is better to slice the model isolating the class for which we want to generate the attribute suggestions so that the NLP recommendations are more focused around the semantics of that class and avoid noise coming from other not-so-close classes in the model. There is clearly a trade-off of how much content should be included in each slice depending on the goal. We have refined our current patterns based on our experimental tests.

In short, in each iteration (steps B.1-C.2), we slice the model according to these patterns:

one slice that contains all the classes in the model after removing their features (attributes and relationships); one slice for each class C in the model (keeping its attributes and dangling relationships); and one slice for each pair of classes (keeping its attributes and dangling relationships). These slices aim to suggest new classes, attributes and relationships, respectively, as we explain in Section 2.2.

Step B.2. Querying the NLP models and historical data to obtain word suggestions Given a slice, we start by extracting the element names. They become the list of positive words employed to query the two NLP models (i.e., general knowledge and contextual knowledge). The historical data is used to provide negative words when querying the NLP models. Indeed, if the same list of possible words was used in the past to query the NLP models and the designer rejected a suggestion, that suggestion is stored in the historical data (as explained next in Step C.2), and used as a negative case here.

Each query returns a list of new word suggestions sorted by the partial ordering relation (e.g., euclidean distance) between the embeddings of the initial list of words (i.e., the element names extracted from the model slice) and each suggestion. Therefore, the result after querying the two NLP models for each model slice returns two different lists of related concepts, sorted by shorter to longer distance between embeddings (i.e., sorted by relatedness) that we use to prioritize our suggestions. By default, we merge the two lists (the one coming from the contextual knowledge and the one from the general NLP models) into a single sorted list. If a word appears in both lists, the position in which the word appears in the merged list is that whose distance to the slice is smaller (i.e., the relatedness to the slice is higher).

This process can be customized. Our framework is parametrizable in two ways: (i) you can select the number of suggestions to receive at once, and (ii) customize how the the two lists should be prioritized by defining a weight parameter. Regarding the latter, as previously said, by default, our engine mixes the recommendations coming from both sources into only one sorted list. Nevertheless, we provide a parameter to assign different weights to the two sources of knowledge, gn, a value in the range [0..1], where gn=0 means that the user does not want general knowledge suggestions at all, and gn=1 that she only wants general knowledge suggestions. The weight assigned to the contextual knowledge will be 1 -gn. This prioritization can be used to only get contextual information suggestions, general ones, give different weights to each of them (so that they appear higher in the list) or even to ask for two different lists, which helps trace where the suggestions come from, improving the explainability.

Step B.3. Morphological analysis Before building the potential model elements that will be presented to the designer, we perform some final processing of the lists to remove/refactor some candidate suggestions.

In particular, we use auxiliary NLP libraries [START_REF] Fellbaum | WordNet: An Electronic Lexical Database[END_REF][START_REF]CEA NLP tech: LIMA: LIbre Multilingual Analyzer[END_REF] to perform a morphological analysis of each word (Part-of-Speech (POS) tagging) followed by a lemmatization7 process, paying especial attention to inflected forms. For instance, if one of the terms returned by a query to an NLP model returns the word flyers, our engine lemmatizes it as a verb, resulting in the word fly; and as a noun, resulting in the word flyer. Therefore, it considers the three words as possible candidates to be the name of a new model element. We also use the POS tag to discard words when they do not apply (for instance, verbs as class names).

Step B.4. Building potential model elements to add As a final step, we transform the refined lists of words into potential new model elements. The interpretation of the right type of model element to suggest depends on the type of slice we are processing.

For slices aiming at new class suggestions, the list of potential concepts refined returned by the NLP morphological analysis refinement step (B.3) is filtered 2a), the list of potential concepts refined is: [flights, plane, pilots, pilot, flying, fly, airline, airlines, airplane, jet]. For example, when the designer picks the word pilot, she will receive the three options above, and she could select, for instance, to add it to the model as a new class and relationship (option b) and obtain the model in Figure 2b.

For slices aimed at discovering new associations, each word, w, is suggested as a new association between the two classes in the slice. For instance, let us assume that we kept building the model and added a new class called Plane with no association with the other two (Figure 2c). In this partial model, for the pair of classes Flight and Plane, our engine suggests the engineer to add associations with names: flights, pilots, pilot, flying, fly, jet, airplane. Our designer could select to add two relationships flights and plane to obtain the model in Figure 2d.

Step B.5. Suggestions provided to user In this step, the generated suggestions are provided to the designer. She can accept, discard or ignore each of them. While the two first options are processed (either by integrating them into the partial model or by marking them as negative test cases), when suggestions are ignored, we do not handle them and they can be presented to the designer in the future again.

Step C: Update model and historical data

Step C.1. Partial model update In this step, the suggestion(s) accepted by the designer are integrated into the partial model.

Step C.2. Feedback and historical data Every time the designer discards a recommendation, we annotate it as a negative example in order to avoid recommending it again and to guide the NLP model in an opposite direction (i.e., providing the concept as a negative case). Note that the more complete the partial model is and the more feedback we have, the more accurate our suggestions will be.

Tool Support

We present the implementation of our architecture in Fig. 1. The source code and pretrained NLP models to reproduce the experiments are available in our Git repository 8 .

The text preprocessing algorithm that generates the domain corpus of text is implemented as a Java program that reads the input text documents, removes all special characters and merges them into a single textual file. The resulting file only contains words, line breaks and spaces.

To build the NLP models we use GloVe [START_REF] Pennington | GloVe: Global vectors for word representation[END_REF], which is an unsupervised learning method that creates word embeddings via an statistical data analysis. It is trained on the entries of a global word-word co-occurrence matrix, which tabulates how frequently words co-occur with one another in a given corpus. Populating this matrix requires a single pass through the entire corpus to collect the statistics, which makes it an efficient method. Note that, while different methods for the computation of word embeddings (e.g., GloVe, word2vec and FastText) differ in its implementation, they can be used equally for the purposes of this work. We have used the Stanford's implementation of GloVe written in Python.

Our NLP component encapsulates two GloVe models, one trained with general data and one with contextual project one (when available). We have created a simple Java library with the necessary methods to create, train, load and query these two NLP models. This library provides functions such as get_suggestions(nlp_model, positive_concepts, negative_concepts, num_suggestions).

As auxiliary NLP tools for morphological analysis and lemmatization, we use WordNet [START_REF] Fellbaum | WordNet: An Electronic Lexical Database[END_REF], which is part of the Python NLTK (Natural Language Toolkit). We query WordNet to obtain the parts of speech of words (i.e., noun, verb, adjective, etc.) and use its lemmatization tool.

Our implementation supports models in EMF (Eclipse Modeling Framework) 9 [37] format. Since this framework is implemented in Java and our engine Finally, the Historical Data component stores feedback from the designer. This feedback is stored for each user and model, i.e., it keeps track of the suggestions that the designer has discarded for each model. The discarded suggestions are used to both avoid suggesting them again and use them as negative cases from which we also learn. Given the way in which GloVe word embeddings are encoded, it enables the search of words that are both as close as possible to a set of words (positive cases) and as far as possible to other set of words (negative cases). The recommendation engine uses this feature when querying the NLP models.

Validation

Case study and experiment setup

Let us consider an example of an industrial project: the introduction of a notice management system for incidents in the municipal water supply and sewage in the city of Malaga, Spain. The Malaga city hall and the municipal water and sewage company (EMASA) started a project to manage the incidents that clients and citizens notify to have occurred either in private properties or public locations. This project replaced the previous process that was handled via phone calls and paper forms. In this project, contextual knowledge can be derived from the project documentation (e.g. requirements specification). Meanwhile, general knowledge can be extracted from texts in Wikipedia entries, Google News, or similar sources covering general water supply and sewage issues. The project developers produced manually the domain model of this system shown in Fig. 3a. The goal of this section is to evaluate how well our approach can regenerate this manual model by means of autocompleting partially seeded models to show the quality and benefits of our proposal.

For this case study, the contextual model was trained with the project documentation provided by the client: slides ( 21), forms and the software requirement specification document (78 PDF pages) that after being preprocessed turned into a 48Kb text file with 7.675 words 10 . For the general knowledge model, we have reused the pretrained word embeddings available at https: //nlp.stanford.edu/projects/glove/, which has been trained with the corpus of text from Wikipedia.

As a preliminary evaluation, we have split the domain model from our case study into 5 different models, each simulating a potential partial model with a single class and no attributes/relationships. Fig. 4 shows our five initial models. The goal is to reconstruct the model shown in Fig. 3a from each partial model. We have parameterized our engine to provide 20 suggestions per round and opted to receive contextual and general knowledge separately.

Fig. 4: Initial models

We have automated the reconstruction process by automatically simulating the behaviour of a designer using our framework. As we know the final target (the full model) we can automatically accept/reject the suggestions based on whether they do appear in the full model or not. Accepted ones are integrated in the (now extended) partial model. New rounds of suggestions are requested until no more acceptable suggestions are received. Note that this evaluation can be regarded as a worst case scenario as the evaluation criteria is very strict: in a real-case scenario, a designer could consider as good suggestions a broader set of scenarios as there is no single and unique correct model for any domain. And, obviously, real designers can completely stop the suggestions at any time, edit the model manually and then resume the suggestions again.

As part of this evaluation, we consider the answer to the following research questions for our case study: Our experiments show that, in all cases, our simulation has been able to reconstruct all classes; for the attributes it has identified an average of 9.67 out of the 27 that the complete model has with a standard deviation of 0.58 (i.e. 9.67 ± 0.58), 9.67 ± 0.58 out of the 13 relationships; and 6.67 ± 0.6 out of the 7 association names. In total, it has identified an average of 34 ± 1.73 out of the 55 model elements, which is approximately a 62% of the model. As an example, Fig. 3b shows the autocompletion produced starting from an empty class Notice.

Precision (RQ2)

On average, our framework has been queried 15.67 times (each query returning 20 possible suggestions for each source of knowledge), with a standard deviation of 5.69 (15.7 ± 5.69). This means that our designer bot has received, on average, a total of 626.7 ± 227.4 suggestions. It has accepted an average of 25.67 ± 0.58 suggestions, resulting on 34 ± 1.73 model elements added to the domain model. Thus, the precision of our approach is 4.46%. Although in absolute terms it seems low, note that the average number of suggestions accepted per set of suggestions is 1.79 ± 0.62 suggestions and that our partial model includes very limited knowledge (a single class name). Furthermore, our automatic acceptance criteria is very strict, i.e., it considers a single target domain model as the ground truth. In reality, several alternatives models are feasible so a human designer might have accepted suggestions rejected by the bot.

Source of accepted suggestions (RQ3)

On average, an 85.7% of accepted suggestions came from the contextual knowledge. This is expected as this is a very particular domain for which it is difficult to assume there is a rich-enough description in a general knowledge source. Nevertheless, the general knowledge has complemented the contextual one and has helped discovering implicit knowledge in the contextual descriptions.

Performance (RQ4)

We have measured independently the execution time that each component of our framework and its main steps takes. The experiments have been executed in a machine with Windows 10, an Intel i7 8th generation processor at 1.80 GHz, 16Gb of RAM memory and 4 cores with 8 logical processors.

We have observed that, for our case study, all the times are under one second. For instance, the model slicing takes on average 19 milliseconds (ms), the build of the potential model suggestions takes on average 1 ms, etc. The only step that heavily affects the overall performance of our framework is the querying of the NLP models. Thus, we have paid special attention to that.

On the one hand, the training of the contextual knowledge model using the project documents only took several ms. It resulted in a file that contains the word embeddings with a size of 121 KB. After training, the time to load the word embeddings-this is done only when the system is initialized-as well as the time to query the model are negligible. This is due to the small size of the contextual data (text documents, word embeddings).

On the other hand, for the general knowledge model, the file with the pretrained embeddings has a size of 989 MB and it takes around 32 seconds to be loaded. Once loaded, a query takes several seconds. For this reason, we plan in the future to replace the Python implementation of GloVe with a pure C implementation that will improve the performance considerably.

Related Work

Our work is related to works on autocompletion in software development, extraction of models from text and modeling assistants. In the following we give an overview of the state of the art in each group and discuss the differences with our own proposal.

Autocompletion in software development. Development tools can offer different types of recommendations to software developers [START_REF] Robillard | Recommendation systems for software engineering[END_REF][START_REF] Gasparic | What recommendation systems for software engineering recommend[END_REF][START_REF] Harel | Wise computing: Toward endowing system development with proactive wisdom[END_REF]. Among them, code completion [START_REF] Marasoiu | An empirical investigation of code completion usage by professional software developers[END_REF][START_REF] Bruch | Learning from examples to improve code completion systems[END_REF] is a standard feature of IDEs. A similar notion is query (auto)completion in information retrieval [START_REF] Shao | Query auto-completion based on word2vec semantic similarity[END_REF], e.g., search engines. Both approaches propose textual completions and use a combination of frequent patterns, information about the context and historic data to provide useful suggestions.

In this paper, we target model completion rather than source code or query completion. While some of the techniques employed in these problems are related, there are fundamental differences among them:

-Code and query completion place a very strong emphasis the analysis of historic data. This requires a large repository of examples, which is usually not available at such a large scale in the case of modeling. For this reason, similarity and relatedness, which play a complementary role in code and query completion, are the key components of model completion. -Some coding activities are predictable and repetitive (e.g., define a constructor to initialize all attributes of an object) so code completion can provide useful suggestions simply by considering frequent patterns. On the other hand, models tend to be one-of-a-kind: even when considering a ubiquitous domain (e.g., the structure of an organization), the vocabulary, constraints and level of detail may vary from one model to another. -Code and query completion is typically local : completions are proposed for the current method or query. Meanwhile, model completion can be local or global, i.e., identify missing elements in the entire model.

-In addition to proposing relevant missing elements, model completion needs to assign a category/type to these proposed elements (attribute, class, relationship) and establish how it relates to the existing model, e.g. a relationship between classes X and Y.

Model extraction from textual requirements. Several approaches aim to generate software models from textual specifications. Among them, some works extract structural information such as UML class diagrams [START_REF] Kumar | Static UML model generator from analysis of requirements (SUGAR)[END_REF][START_REF] Arora | Extracting domain models from natural-language requirements: approach and industrial evaluation[END_REF][START_REF] Sagar | Conceptual modeling of natural language functional requirements[END_REF][START_REF] Harmain | Cm-builder: A natural language-based case tool for object-oriented analysis[END_REF], entityrelationship diagrams [START_REF] Gomez | A system for the semiautomatic generation of er models from natural language specifications[END_REF] or domain ontologies [START_REF] Buitelaar | Ontology learning from text: methods, evaluation and applications[END_REF][START_REF] Lee | Automated ontology construction for unstructured text documents[END_REF][START_REF] Dahab | Textontoex: Automatic ontology construction from natural english text[END_REF][START_REF] Wong | Ontology learning from text: A look back and into the future[END_REF]. Others focus on other type of information, like variability [START_REF] Bakar | Feature extraction approaches from natural language requirements for reuse in software product lines: A systematic literature review[END_REF][START_REF] Reinhartz-Berger | Extracting core requirements for software product lines[END_REF] (commonalities and differences among the products in a software product line) or behavior [START_REF] Friedrich | Process model generation from natural language text[END_REF] (such as the workflow in a business process). Their goal is not the completion of a partial model, but the construction of a new model from scratch.

Even though the type of models varies, all these approaches rely on Natural-Language Processing (NLP) techniques and tools and share similar subtasks as ours. Nevertheless, they do not take into account the partial model, as we do in the context of this paper. This means that their approach cannot be guided by the designer nor can they integrate any type of feedback during the model creation process. As a consequence, their predictions will be less accurate.

Modeling assistants. Several tools apply model autocompletion with different goals. For instance, [START_REF] Kuschke | Pattern-based auto-completion of UML modeling activities[END_REF] analyzes designer actions in the GUI of a model editor to detect ongoing high-level activities from a predefined catalog (e.g., a refactoring) and propose actions to auto-complete the activity. [START_REF] Kuhn | On recommending meaningful names in source and UML[END_REF] suggests meaningful names for methods and UML model elements. Meanwhile, [START_REF] Sen | Towards domain-specific model editors with automatic model completion[END_REF] suggests completions of a domain-specific model in order to satisfy well-formedness rules. These completions are proposed by used either a relational model finder (Alloy) or a constraint solver. Another approach, [START_REF] Elkamel | An UML class recommender system for software design[END_REF], clusters classes in a metamodel repository according to a similarity metric to identify related classes. Then, it recommends related classes to those in the partial model. None of them leverage any project textual documents to improve the recommendations. Moreover, two commercial software development tools provide AI-powered assistants: ServiceStudio from OutSystems [30] and Mendix Assist [26], based on existing models in their private repositories. As before, they do not use any type of project document as additional input. Finally, [START_REF] Agt-Rickauer | Automated recommendation of related model elements for domain models[END_REF] recommends related models based on knowledge from Google Books, but it does not consider feedback nor contextual knowledge as we do.

Conclusions

This exploratory paper has proposed a model recommendation engine that, once fed with textual descriptions of a domain, generates autocompletions for domain models under development. This is a first step towards a more general modeling assistant that effectively helps modelers specify better models faster.

As further work, we plan to integrate in our framework other types of information (such as past models created by the same company in the same or similar domains and general ontologies, e.g., SUMO) to provide richer suggestions. This will imply dealing with prioritization/inconsistencies among the different sources.

Usability will be a key point to ensure the framework is well accepted by software designers. We will explore the optimal parameters for our system such as the number of suggestions, the confidence threshold to suggest a new model element, the timeliness (i.e., when to trigger the suggestions) and the level of automation (i.e., they are automatically sent to the user versus they are provided only on-demand). We will ensure that our approach can be effectively used by carrying out an empirical evaluation with a group of experienced designers.

We will keep refining the techniques presented in this paper, e.g., accounting for aggregation, composition, and generalization relations and suggesting also data types and potentially missing constraints beyond just new elements. We will also like to extend the type of suggestions we offer to include the replacement and removal of elements. Finally, we will study the application of our approach on other types of models and modeling languages and the exploitation of other types of NLP models in software modeling.

Fig. 1 :

 1 Fig. 1: Autocompletion Framework and Process. Legend: Green boxes are data. White boxes are software artifacts. Dotted lines denote already implemented software that we reuse. Solid lines are our contribution/implementation.

Fig. 2 :

 2 Fig. 2: Flight model evolution to remove verbs, adjectives and plural nouns. After the filtering process, each of the remaining words, w, is a candidate to become a new class named w. For instance, let us assume that we are going to build a model in the domain of flights. Consider that we start from a partial model with a single class named Flight and no attributes as Figure 2a shows. After the slicing, querying and lemmatization, we obtain the list of potential concepts refined [flights, plane, pilots, pilot, flying, fly, airline, airlines, airplane, jet]. We use the POS tag to filter the list by discarding verbs, adjectives and plural nouns. The list of remaining words is [plane, pilot, flying, fly, airline, airplane, jet]. For each word in this list, our algorithm suggests to add a new class with the same name. For slices aimed at suggesting new features for a class C, for each output word, w, we offer the user three options: (a) add a new attribute named w to C (the user is in charge of selecting the right datatype); (b) add a new class called w and a new relationship between C and w ; (c) if there is already a class called w in the partial model, our engine suggests the addition of a relationship between C and w. Continuing with the example, for a slice containing the class Flight with no features (Figure2a), the list of potential concepts refined is: [flights, plane, pilots, pilot, flying, fly, airline, airlines, airplane, jet]. For example, when the designer picks the word pilot, she will receive the three options above, and she could select, for instance, to add it to the model as a new class and relationship (option b) and obtain the model in Figure2b.For slices aimed at discovering new associations, each word, w, is suggested as a new association between the two classes in the slice. For instance, let us assume that we kept building the model and added a new class called Plane with no association with the other two (Figure2c). In this partial model, for the pair of classes Flight and Plane, our engine suggests the engineer to add associations with names: flights, pilots, pilot, flying, fly, jet, airplane. Our designer could select to add two relationships flights and plane to obtain the model in Figure2d.

  (a) Manually Created Domain Model (b) Domain model autocompleted

Fig. 3 :

 3 Fig.3: Emasa Domain Models needs to heavily interact with it, the Model Recommendation Engine is implemented in Java, too. For example, our engine uses the EMF API to read the input domain model, represented as a UML class model and slices it. The engine is in charge of orchestrating also the previous Python components and implements the suggestion algorithm described in Section 2.Finally, the Historical Data component stores feedback from the designer. This feedback is stored for each user and model, i.e., it keeps track of the suggestions that the designer has discarded for each model. The discarded suggestions are used to both avoid suggesting them again and use them as negative cases from which we also learn. Given the way in which GloVe word embeddings are encoded, it enables the search of words that are both as close as possible to a set of words (positive cases) and as far as possible to other set of words (negative cases). The recommendation engine uses this feature when querying the NLP models.

-

  RQ1. Recall: what percentage of the elements of the final model are we able to reconstruct? -RQ2. Precision: what percentage of suggestions are accepted and integrated into the domain model? -RQ3. Source of accepted suggestions: what percentage of accepted suggestions are coming from general knowledge and contextual knowledge? -RQ4. Performance: how does our prototypical implementation perform? 4.2 Recall (RQ1)

According to the Cambridge dictionary: "information on many different subjects that you collect gradually, from reading, television, etc., rather than detailed information on subjects that you have studied formally".

Note that "NLP model" and "domain model" do not refer to the same type of model at all. In the NLP field, a model is the result of analyzing the textual corpus of data (it could be a trained neural network, a statistical model,...). To avoid confusion, in this work, each time we refer to a NLP model, we always refer to it as "NLP model" and never as "model" alone.

https://nlp.stanford.edu/projects/glove/, https://wikipedia2vec.github.io/wikipedia2vec/ pretrained/, https://code.google.com/archive/p/word2vec/

In linguistics, lemmatization is the process of grouping together the inflected forms of a word so they can be analysed as a single item, identified by the word's lemma, or dictionary form.

https://github.com/modelia/model-autocompletion

https://www.eclipse.org/modeling/emf/

These documents are not publicly available due to industrial property right. Nevertheless, the software artifacts derived from them are available in our Git repository.


Maria Sporbert
email: maria.sporbert@botanik.uni-halle.de

Petr Keil

Gunnar Seidler

Helge Bruelheide

Ute Jandt

Svetlana Aćić

Idoia Biurrun

Juan Antonio Campos

Andraž Čarni

Milan Chytrý

Renata Ćušterevska

Jürgen Dengler

Valentin Golub

Florian Jansen

Anna Kuzemko

Jonathan Lenoir

Corrado Marcenò

Jesper Erenskjold Moeslund

Aaron Pérez-Haase

Solvita Rūsiņa

Urban Šilc

Ioannis Tsiripidris

Vigdis Vandvik

Kiril Vasilev

Risto Virtanen

Erik Welk

Stephan Hennekens

Borja Jiménez-Alfaro

Testing macroecological abundance patterns: The relationship between local abundance and range size, range position and climatic suitability among European vascular plants

Keywords: Europe Taxon: Vascular plants abundance, climatic suitability, commonness and rarity, range size, realized climatic niche, resolution, species distribution models, vegetation-plot data

niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

A fundamental question in macroecology centres around what drives spatial variation in species' abundance, with species' abundance across the geographic range having recently been proposed as one of the so-called essential biodiversity variables [START_REF] Jetz | Essential biodiversity variables for mapping and monitoring species populations[END_REF]. Much effort has gone into identifying the drivers of local abundance, and there is a substantial body of literature establishing that it depends on local factors such as environmental suitability and local biotic interactions (e.g. [START_REF] Andrewartha | The distribution and abundance of animals[END_REF][START_REF] Macarthur | Density compensation in island faunas[END_REF][START_REF] Peterson | Ecological niches and geographic distributions (MPB-49)[END_REF][START_REF] Staniczenko | Linking macroecology and community ecology: refining predictions of species distributions using biotic interaction networks[END_REF]. Similarly, it has been established that the limit of species' distribution is a function of the interplay between environmental conditions and barriers affecting dispersal and evolution (Baselga, Lobo, Svenning, & Araujo, 2012). Based on metapopulation and metacommunity concepts, local and regional processes are hypothesised to be mechanistically linked [START_REF] Leibold | The metacommunity concept: a framework for multi-scale community ecology[END_REF], and relationships between species' local abundance and geographical distribution may be expected. However, supporting empirical data, especially for herbaceous plants, is lacking. In this paper, we explore whether local abundance is associated with geographic distribution in 517 European vascular plant species at broad geographic extents. Specifically, we focus on three macroecological relationships: (1) the abundance-range size relationship, (2) the abundance-range centre relationship, and (3) the abundance-suitability relationship (Table 1). To test the relationships, we interrogated existing data on the species' geographic range characteristics and local abundances, deriving range information from the Chorological Database Halle (CDH; E. Welk et al., unpublished data) and local abundance data from the European Vegetation Archive (EVA; [START_REF] Chytrý | European Vegetation Archive (EVA): An integrated database of European vegetation plots[END_REF]. The EVA data are recorded as percentage cover per plot, which we extrapolated to determine local abundance following [START_REF] Preston | The commonness, and rarity, of species[END_REF].

For the first relationship, we checked for associations between species' local abundance and the size of the respective geographic range or climatic niche and ask whether locally abundant species are generally more widely distributed, i.e. whether they have larger geographic ranges than species with relatively lower local abundance values (Table 1). Such a relationship has been widely and empirically documented [START_REF] Hanski | Dynamics of regional distribution: the core and satellite species hypothesis[END_REF][START_REF] Brown | On the relationship between abundance and distribution of species[END_REF][START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF][START_REF] Reif | Unusual abundance-range size relationship in an Afromontane bird community: the effect of geographical isolation[END_REF][START_REF] Gaston | Pattern and process in macroecology[END_REF], and several mechanisms have been proposed as drivers [START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF]. For instance, when a species can tolerate a large variability of climatic conditions across its range, it should be able to cope with local temporal climatic variability and thus perform better than local competitors with narrower climatic niches and limited plasticity, resulting in it showing higher local abundance. This mechanism relies on the assertion that a species' geographical distribution is driven by the same climatic tolerances that influence its local abundance, which may not be the case [START_REF] Guisan | Predicting species distribution: offering more than simple habitat models[END_REF][START_REF] Mertes | Disentangling scale dependencies in species environmental niches and distributions[END_REF]. [START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF] reviewed eight other mechanisms that could lead to this relationship, two of which were artefactual, while the others considered niche breadth, resource availability, habitat selection, dispersal limitation, metapopulation dynamics or position within the distributional range. In conclusion, the authors noted that none of the proposed mechanisms has received unequivocal support. As such, the abundance-range size relationship has seen mixed empirical support [START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF][START_REF] Koenker ; Köckemann | The relationships between abundance, range size and niche breadth in Central European tree species[END_REF], and there have been concerns that species' abundance and range-size were mostly analysed at completely different, or inappropriate, scales [START_REF] Thompson | Abundance-range size relationships in the herbaceous flora of central England[END_REF][START_REF] Conlisk | The shape of a species' spatial abundance distribution[END_REF][START_REF] Kambach | Of niches and distributions: range size increases with niche breadth both globally and regionally but regional estimates poorly relate to global estimates[END_REF]. For our study, on a large group of herbaceous plant and shrub species predominantly over their full distributional ranges, we expected locally less abundant species to be more narrowly distributed, and locally abundant species to be more widespread in geographic and climatic space (Figure 1a).

The second intraspecific abundance-range centre relationship tested here links local abundance values to the distance of the locality from the centre of the species' geographic range or climatic niche (Table 1). The hypothesis stems from the assumption that the environment tends to be more suitable at the centre of the range than near its edges [START_REF] Grinnell | The role of the 'accidental[END_REF][START_REF] Hengeveld | The distribution of abundance. I. Measurements[END_REF][START_REF] Brown | On the relationship between abundance and distribution of species[END_REF]. However, it has become clear that species' geographic ranges can be shaped by barriers such as mountains or coastlines [START_REF] Hargreaves | Are species' range limits simply niche limits writ large? A review of transplant experiments beyond the range[END_REF], and ecological conditions do not systematically follow geographic gradients [START_REF] Pironon | Geographic variation in genetic and demographic performance: new insights from an old biogeographical paradigm[END_REF]. Thus, the geographic distribution of suitable environment can be unrelated to the geometry of a species' range [START_REF] Manthey | A test of niche centrality as a determinant of population trends and conservation status in threatened and endangered North American birds[END_REF]. Empirical support for the positive form of this relationship in geographic space is weak (e.g. [START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF][START_REF] Sagarin | Moving beyond assumptions to understand abundance distributions across the ranges of species[END_REF][START_REF] Dallas | Species are not most abundant in the centre of their geographic range or climatic niche[END_REF][START_REF] Pironon | Geographic variation in genetic and demographic performance: new insights from an old biogeographical paradigm[END_REF]. While supported in theory, empirical support for the hypothesis in climatic space is mixed, with some studies finding stronger support for this relationship in climatic than in geographic space (Martínez-Meyer, Díaz-Porras, [START_REF] Martínez-Meyer | Ecological niche structure and rangewide abundance patterns of species[END_REF][START_REF] Van Couwenberghe | Can species distribution models be used to describe plant abundance patterns[END_REF]Osorio-Olvera, Yáñez-Arenas, Martínez-Meyer, & Peterson, 2020), while others finding weak or no support [START_REF] Abeli | Effects of marginality on plant population performance[END_REF][START_REF] Pironon | Do geographic, climatic or historical ranges differentiate the performance of central versus peripheral populations?[END_REF][START_REF] Dallas | Weak support for the abundant niche-centre hypothesis in North American birds[END_REF]. For our study, we therefore expected the relationship between local abundance and distance from the range centre to be weak or absent in geographic space, while to be positive in climatic space (Figure 1b).

The third abundance-suitability relationship assumes that the more suitable the climate for a species within a larger area, the higher the abundance of the species should be within local plots in that area (Table 1). By equating occurrence probability with climatic suitability, it is expected that favourable climatic conditions support higher species' abundance as a result of improved population and/or individual performance [START_REF] Araújo | Dynamics of extinction and the selection of nature reserves[END_REF]. While some previous studies have found strong support for this relationship [START_REF] Vanderwal | Abundance and the environmental niche: environmental suitability estimated from niche models predicts the upper limit of local abundance[END_REF][START_REF] Weber | Is there a correlation between abundance and environmental suitability derived from ecological niche modelling? A meta-analysis[END_REF], others failed to detect any effects [START_REF] Gomes | Species Distribution Modelling: Contrasting presence-only models with plot abundance data[END_REF][START_REF] Santini | Addressing common pitfalls does not provide more support to geographical and ecological abundant-centre hypotheses[END_REF]. As statistically significant relationships have only been recorded for a few species, a low generality of climatic suitability as a predictor of spatial patterns of abundance may be assumed [START_REF] Vanderwal | Abundance and the environmental niche: environmental suitability estimated from niche models predicts the upper limit of local abundance[END_REF].

In addition, species' responses to differing climatic conditions can be non-Gaussian (i.e. skewed, bimodal, or truncated) [START_REF] Austin | Models for the analysis of species' response to environmental gradients[END_REF]. Therefore, species' climatic niche may not show highest climatic suitability in the very centre, but somewhere closer to the edges. For this study, we expected local abundance to be positively related to the coarse-grain climatic suitability predicted for the 15 km² grid cells containing the respective vegetation plots (Figure 1c).

It is noted that there is a suite of mechanisms that can weaken or limit the above-described relationships by affecting species' local abundance but without affecting their overall geographic distribution. Examples include: environmental and demographic stochasticity [START_REF] Lande | Stochastic population dynamics in ecology and conservation[END_REF], particularly when they are temporally synchronous over large geographic extents; biotic interactions [START_REF] Dallas | Species are not most abundant in the centre of their geographic range or climatic niche[END_REF]; soil and disturbance parameters [START_REF] Vanderwal | Abundance and the environmental niche: environmental suitability estimated from niche models predicts the upper limit of local abundance[END_REF], or isolation by dispersal barriers [START_REF] Reif | Unusual abundance-range size relationship in an Afromontane bird community: the effect of geographical isolation[END_REF]. Since correlative models of climatic suitability do not integrate these factors, species might be absent or show low abundance at sites with predicted high climatic suitability [START_REF] Vanderwal | Abundance and the environmental niche: environmental suitability estimated from niche models predicts the upper limit of local abundance[END_REF]. Consequently, relationships could be absent or triangular (Figure 1b,c), which are common forms of relationship between macroecological variables [START_REF] Brown | Evolution of species assemblages: effects of energetic constraints and species dynamics on the diversification of the North American avifauna[END_REF], indicating more limiting factors at play than just a linear response of central tendency (as in Figure 1a).

Table 1 Description and references to the three tested relationships that link species' local abundance to distribution in coarse-grain geographic or climatic space.

Relationship

Description References (Interspecific) abundance-range size relationship

Locally rare species tend to be narrowly distributed, while locally abundant species tend to be more widespread in geographic or climatic space. [START_REF] Hanski | Dynamics of regional distribution: the core and satellite species hypothesis[END_REF][START_REF] Brown | On the relationship between abundance and distribution of species[END_REF][START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF][START_REF] Thompson | Abundance-range size relationships in the herbaceous flora of central England[END_REF][START_REF] Reif | Unusual abundance-range size relationship in an Afromontane bird community: the effect of geographical isolation[END_REF]Gaston & Blackburn, 2008 (Intraspecific) [START_REF] Brown | On the relationship between abundance and distribution of species[END_REF][START_REF] Sagarin | The 'abundant centre' distribution: to what extent is it a biogeographical rule?[END_REF]Sagarin et al Pironon et al., 2017;[START_REF] Santini | Addressing common pitfalls does not provide more support to geographical and ecological abundant-centre hypotheses[END_REF][START_REF] Osorio-Olvera | Relationships between population densities and niche-centroid distances in North American birds[END_REF] Species show lower local abundance in climatically less suitable areas but achieve higher local abundance in climatically more suitable areas.

Geographic ranges

For this study, we used existing data on the geographic ranges of European vascular plant species from the CDH (E. Welk et al., unpublished data). The study area comprised all geographical European countries as well as Turkey, Georgia, Armenia and Azerbaijan (see Appendix S1.1 and 1.2 in Supporting Information). We only included species for which digitized GIS-data were available (i.e.

range polygons and point occurrences). We excluded trees, bryophytes, lichens, fungi and algae from the vegetation-plot records to obtain a more homogeneous dataset of herbaceous species, dwarf shrubs and shrubs. Data on a total of 517 species were consequently amassed for the study, which represents approximately 10% of all Central European vascular plant species [START_REF] Meusel | Vergleichende Chorologie der zentral-europäischen Flora[END_REF].

Species' range information was processed to coarse-grain raster layers of 2.5-min resolution, which corresponded to grid cells covering approximately 15 km² each across Central Europe (see e.g. the range of Inula conyzae in Figure 2a). The measure of range size for each species then corresponded to the number of grid cells it occupied (Area of Occupancy (AOO)) (IUCN, 2019).

Climatic niches

The multi-dimensional climatic space (or climatic niche) of each geographic range was determined using principal components analysis (PCA) of 19 bioclimatic variables from WorldClim [START_REF] Hijmans | Very high resolution interpolated climate surfaces for global land areas[END_REF] at 2.5-min cell resolution (Figure 2b; climatic niche of Inula conyzae). The common European climatic space is represented by the first two PCA axes, which explain 88.0% of the data variance. Unique PCA space locations were considered and counted as grid cells in climatic space. Species' niche size was calculated as the number of occupied grid cells in climatic space (see Appendix S2.1-2.3).

Local abundance in vegetation plots

Local abundance values for a total of 744,513 vegetation plots were obtained from EVA [START_REF] Chytrý | European Vegetation Archive (EVA): An integrated database of European vegetation plots[END_REF] for the 517 study species in October 2015. For half of the plots, the recorded area was between 9 and 100 m² (25 th and 75 th percentile) with a median of 25 m². Data for subspecies were merged at the species level, and we matched synonymous species names according to: (i) a taxonomic reference list for Germany (GermanSL version 1.2, [START_REF] Jansen | GermanSL -eine universelle taxonomische Referenzliste fuer Vegetationsdatenbanken[END_REF]; and (ii) for all taxonomic reference lists available via the R package 'taxize' [START_REF] Chamberlain | taxize -taxonomic search and retrieval in R[END_REF][START_REF] Core | R: A language and environment for statistical computing[END_REF]. We only included species that occurred in at least 100 vegetation plots in the EVA dataset, and plots with geographic location uncertainty of < 10 km. The number of vegetation plots for each species ranged from 101 plots for Malva pusilla to 23,464 plots for Plantago lanceolata. For half of the studied species, the number of plots ranged between 631 and 4,531 plots (25 th and 75 th percentile), with a median of 1,863 plots (see Appendix S1.3).

Cover-abundance values compiled in EVA that were based on different scales (e.g. [START_REF] Domin | The relations of the Tatra mountain vegetation to the edaphic factors of the habitat: a synecological study[END_REF][START_REF] Braun-Blanquet | Pflanzensoziologie: Grundzüge der Vegetationskunde[END_REF] were transformed to a common percentage scale (van der [START_REF] Van Der Maarel | Transformation of cover-abundance values in phytosociology and its effects on community similarity[END_REF].

When more than one plot per species was present in a 2.5-min raster cell, we calculated mean values of abundance (%) to reduce effects of spatial autocorrelation and pseudo-replication. The percentage of grid cells with less than four plots ranged from 39.1% to 97.1% per species. For half of the studied species, the percentage of grid cells with less than four plots was between 66.7% and 77.4% (25 th and 75 th percentile) with a median of 71.5%. The percentage of grid cells with more than 10 plots ranged from 0.0% to 28.6%. For half of the studied species, the percentage of grid cells with more than 10 plots was between 2.6% and 6.1% (25 th and 75 th percentile), with a median of 4.3% (see Appendix S1.4). Information on source databases that provided vegetation plot data can be found in Appendix S1.5.

Distance from centre of the geographic range or climatic niche

To determine the centroids of each species' geographic range and climatic niche, all grid cells in which a species was indicated as present in the CDH database were considered. Geographic range centroids were calculated as the arithmetic mean of spatial central coordinates of grid cells over the species' CDH geographic range. To determine species' niche centroids, the multivariate climatic space was translated into two-dimensional space (using PCA), and species' geographic occurrences were projected into this climatic niche space. Niche centroids were determined as the arithmetic mean of PCA-coordinates of the respective species' raster cell values. Geographic distance (in kilometres) from each respective EVA vegetation plot to the respective species' CDH range centre was determined using Haversine great circle geographic distance (Figure 2c,d). We calculated Mahalanobis distance to the climatic niche centroid as a measure in climatic space (Figure 2e,f).

Mahalanobis distance is considered as a good proxy for marginality since it takes into account the covariance structure of the data (Osorio-Olvera, Soberón, & Falconi, 2019; Osorio-Olvera et al., 2020). For each species' vegetation plot position, the distance to range or niche centroid was divided by the species-specific maximum distance to the range or niche centroid (distance/distance max ). This standardization enabled and simplified comparison among the species in our study.

Coarse-grain climatic suitability

We used species distribution modelling (SDM) to obtain spatial estimates of climatic suitability within each species' geographic range. SDMs estimate occurrence probabilities based on the relationship between species occurrence and environmental (climatic) characteristics. We used occurrence data from CDH and bioclimatic variables provided by the CHELSA project [START_REF] Karger | Climatologies at high resolution for the earth's land surface areas[END_REF] SDMs estimate spatial predictions of environmental suitability from 0 (not suitable) to 1 (most suitable) (Figure 2g, h). We applied four different suitability modelling methods from the three main groups of modelling approaches (i.e. machine learning methods, statistical modelling and similarity methods). The methods we applied are 'bioclim' (similarity method), 'multivariate adaptive regression splines' (mars) (statistical modelling), 'random forest' (rf) and 'support vector machine'

(svm) (machine learning methods). We used the area under the receiver operating characteristic (ROC) curve (AUC; [START_REF] Bradley | The use of the area under the ROC curve in the evaluation of machine learning algorithms[END_REF] to calculate model accuracy, within which high AUC values (i.e.

those closer to 1) indicate a strong capacity for model discrimination [START_REF] Bedia | Dangers of using global bioclimatic datasets for ecological niche modeling. Limitations for future climate projections[END_REF]. Species distribution modelling was performed using the R package 'sdm' (version 1.0-67) [START_REF] Naimi | sdm: a reproducible and extensible R platform for species distribution modelling[END_REF]. We fitted and evaluated the four models using 10 runs of subsampling replications withholding 30 percent samples as test data.

Abundance vs range size, centrality and coarse-grain climatic suitability

We applied 'ordinary least squares' (OLS) linear regression models to examine the relationship of local abundance with range size, centrality and coarse-grain climatic suitability. We used 'linear quantile regression' to examine the relationship between centrality and coarse-grain climatic suitability to upper limits (90th quantile) of abundance values to test whether the relationships would be better described as "triangular", as illustrated in Figures 1b and1c. To estimate the overall trend across species, a meta-analysis was performed on species' slopes for each of the applied centrality and climatic suitability measures [START_REF] Borenstein | Effect sizes for continuous data[END_REF]. We conducted a mixed-effect metaanalysis on the slopes and the associated variance of each of the centrality and suitability measures to calculate a summary effect size including species as a random factor. Quantile regressions were performed using the R package 'quantreg', (version 5.38) (Koenker, 2018) and the mixed-effect metaanalysis using the function 'rma' from package 'metafor' [START_REF] Viechtbauer | Conducting meta-analyses in R with the metafor package[END_REF]. All the analyses were rerun on a subset of the dataset, for which only grid cells with a minimum number of four occurrences of each species were included.

Range of Inula conyzae and location of vegetation plots

Geographic and climatic centrality

Distance to niche centroid

Climatic suitability

Predicted climatic suitability

Geographic range and climatic niche

Distance to range centroid Climatic space Geographic space 3 Results

Abundance vs range size and niche size

Species' range size (no. of occupied grid cells) ranged from 1,202 in Malva pusilla to 782,025 in Centaurea maculosa. For half of the species, range size was between 74,867 and 476,865 (25 th and 75 th percentile), with a median of 254,579 grid cells. Species' niche size (no. of occupied grid cells) ranged from 162 in Symphytum officinale to 9,318 in Ranunculus flammula. For half of the species, the niche size was between 1,657 and 4,614 (25 th and 75 th percentile), with a median of 3,002 grid cells (see Appendix S3.1). There was a strong significant positive relationship between species range and niche size (R 2 = 0.616, p-value < 0.001, see Appendix S4.1). Species' local abundance (mean plot cover) was significantly, yet weakly, related to range size (R 2 = 0.011, p-value = 0.020) but not to niche size (R 2 = 0.001, p-value = 0.398) (Figure 3a andb). For both relationships we found high intraspecific variation in species' abundance values, as indicated by the width of the vertical error bars in Figure 3.

Abundance vs centrality in geographic space

Across the 517 species we found large variation in slopes of linear regressions relating abundance to the distance from the centre of geographic ranges, with species showing positive (e.g. Brachypodium phoenicoides), negative (e.g. Luzula pilosa), or no relationship (e.g. Potentilla argentea; Figure 4), ranging from -0.31 to 0.38, with a median of -0.03 (Figure 5a). Similarly diverse results were obtained using quantile regressions (90 th quantile used to determine the upper limit of a triangular abundance-range centre relationship), with positive but also negative relationships ranging from -1.0 to 1.0, with a median of -0.08 (Figure 5b). For 13.5% of the species, quantile regression revealed slopes not significantly different from 0 (Table 2). When we summarized the slopes of both linear and quantile regressions with a mixed-effect meta-analysis, we found that the overall mean slope across 517 species was slightly negative and significantly different from 0 in both OLS linear models and linear quantile regressions, with values averaging -0.04 and -0.10, respectively (Table 3). This indicates that the distance of the plot location to the centre of the species' geographic range is a weak and variable predictor of local abundance.

Abundance vs centrality in the climatic niche

Similar to the above-described analysis involving geographic space, we found large variation in regression slopes for the relationships between abundance and distance from the centre of climatic niches (Figure 5c,d). Slopes from linear models ranged from -0.30 to 0.29 with a median of -0.02, while slopes from the quantile regression ranged from -1.00 to 0.89 and had a median of -0.01. For 24.1% of the species, quantile regression slopes were not significantly different from 0 (Table 2). Summarized in a mixed-effect meta-analysis, the overall mean slope was slightly negative and significantly different from 0 in both linear models and quantile regressions, with means of -0.03 and -0.08 respectively (Table 3). Again, this points to a weak and considerably varying relationship.

Abundance vs coarse-grain climatic suitability

The four SDM techniques ('bioclim', 'mars', 'rf', 'svm') predicted similar maps of coarse-grain climatic suitability (Figure 2g,h). According to AUC scores, all techniques had high success rates, with AUC values averaged over 517 species being 0.947, 0.930, 0.916 and 0.718 for 'bioclim', 'mars', 'rf', and 'svm', respectively. Importantly, when predicted climatic suitability was used as a predictor of abundance, we found no general relationship, irrespective of the SDM technique used. Specifically, both OLS linear regression and linear quantile regression showed a number of relationships with both positive and negative slopes, as well as no relationship. For some of the species, linear quantile regression revealed no relationship (slope=0) between abundance and climatic suitability (Table 2, Figure 5e, f and Appendix S4.2). Summarized in a mixed-effect meta-analysis, the overall mean slope was slightly negative for all applied SDM methods in OLS linear regression models and linear quantile regressions. The overall mean slope was significantly different from 0 for 'bioclim', 'svm' and 'rf' based predictions in OLS linear regressions and for all models in quantile regression, indicating a slightly negative trend in local plot abundance with increasing coarse-grain climatic suitability, which again points to a weak and heterogeneous relationship. The analyses were rerun on a subset of the dataset that included only grid cells with a minimum number of four occurrences for each species, which revealed similar results (see Appendix S4.3 and 4.4). Figure 4 Examples of herbaceous species having positive (Brachypodium phoenicoides, left column), nearly absent (Potentilla argentea, middle column), and negative (Luzula pilosa, right column) relationships between local abundance and properties derived from distributions in the coarse-grain geographic and climatic space. Scatterplot and regression coefficients from OLS linear regression models (ols) and linear quantile regressions (qr, 90 th quantile) between abundance and centrality in geographic space (a-c), centrality in climatic space (d-f), and predicted climatic suitability from model 'random forest' (rf) (g-i). Bold lines represent the 50 th quantile regression (regression from linear model); the dashed line represents the 90 th quantile regression. Table 3 Slopes of the mixed-effect meta-analysis for linear models and quantile regressions (90th quantile) between species' local abundance and the six measures for distance and suitability applied For (1), we found no empirical association between species' local abundance and the size of the species' geographic range or the size of its climatic niche estimated at a coarse spatial grain. For (2), contrary to some of our expectations, we found that, on average, species' local abundance was not related to distance with respect to the centre of its geographic range or climatic niche; however, a generally weak and slightly negative relationship indicates substantial variation, with many species having strong positive or strong negative forms of the relationship. For (3), we again unexpectedly found species' local abundance to be nearly unrelated to its predicted climatic suitability, notwithstanding the weak negative trend and, again, considerable variation. As such, despite the significant statistical associations discussed below, most of the relationships were weak and highly variable. While this finding contradicts some early macroecological propositions [START_REF] Brown | On the relationship between abundance and distribution of species[END_REF], it accords with some more systematic and data-intensive empirical evaluations that often showed similarly noisy and weak relationships [START_REF] Gaston | Interspecific abundance-range size relationships: an appraisal of mechanisms[END_REF][START_REF] Koenker ; Köckemann | The relationships between abundance, range size and niche breadth in Central European tree species[END_REF][START_REF] Dallas | Habitat suitability estimated by niche models is largely unrelated to species abundance[END_REF].

Whereas our study tested the relationships on a large group of herbaceous plant and shrub species predominantly over their full distributional ranges, many other studies focused on popular taxa and functional species groups (e.g. trees and amphibians, [START_REF] Vanderwal | Abundance and the environmental niche: environmental suitability estimated from niche models predicts the upper limit of local abundance[END_REF]mammals and trees, Dallas & Hastings, 2018;birds, Osorio-Olvera et al., 2020), or they were restricted to specific geographic regions (e.g. Australian rainforest, VanDerWal et al., 2009;China, Ren et al., 2013).

Overall, we offer two general and plausible explanations for our results. First, that processes driving species' local abundance can differ from those driving occupancy across their geographic or climatic space [START_REF] Shmida | Biological determinants of species diversity[END_REF][START_REF] Wiens | Spatial scaling in ecology[END_REF][START_REF] Bradley | Predicting abundance with presence-only models[END_REF][START_REF] Mertes | Disentangling scale dependencies in species environmental niches and distributions[END_REF]. Continental-scale presence or absence of species may be primarily shaped by broad-scale environmental conditions (e.g. climate), historical factors [START_REF] Brändle | Distribution, abundance and niche breadth of birds: scale matters[END_REF] and long-distance dispersal limitation. In contrast, species' abundance at the local scale may be more influenced by abiotic microhabitat characteristics such as soil or microclimatic conditions [START_REF] Koenker ; Köckemann | The relationships between abundance, range size and niche breadth in Central European tree species[END_REF][START_REF] De Frenne | Microclimate moderates plant responses to macroclimate warming[END_REF], or the prevailing disturbance regimes or successional stages [START_REF] Meurant | The ecology of natural disturbance and patch dynamics[END_REF][START_REF] Morris | Biotic and anthropogenic forces rival climatic/abiotic factors in determining global plant population growth and fitness[END_REF]. Furthermore, biotic interactions may strongly influence local species' abundance [START_REF] Moeslund | Using dark diversity and plant characteristics to guide conservation and restoration[END_REF][START_REF] Dallas | Habitat suitability estimated by niche models is largely unrelated to species abundance[END_REF].

The second explanation emphasizes the central role of temporal scale and short-term stochasticity [START_REF] Lande | Stochastic population dynamics in ecology and conservation[END_REF], which can particularly disrupt patterns of local abundance, thereby disconnecting them from coarse-grain occurrence patterns, which are driven by long-term average conditions. This acknowledges that vegetation plots only reflect abundance at any one point in time (and thus vary within and across years, e.g. due to stochasticity), while species' coarse-grain occurrence patterns, and any derived assumptions on their climatic niches, represent long-term averages.

We consider both explanations to be plausible as that they can explain results associated with the three examined relationships, and because the grain of the vegetation plots is particularly small and thus potentially highly sensitive to both local spatial variation of microhabitats and short-term stochasticity. This is also supported by the observed high variation of abundance values around the determined relationships (see Figure 4).

Our results have several important practical implications: The first concerns the interpretation of SDMs, which have become an essential tool in conservation planning and assessment [START_REF] Peterson | Ecological niches and geographic distributions (MPB-49)[END_REF] and have been used to identify priority species and regions [START_REF] Hoffmann | The impact of conservation on the status of the world's vertebrates[END_REF].

Species' coarse-grain occurrence and local abundance do not frequently display similar patterns, and they often do not even correlate well [START_REF] Mi | Combining occurrence and abundance distribution models for the conservation of the Great Bustard[END_REF]. In a study by [START_REF] Johnston | Abundance models improve spatial and temporal prioritization of conservation resources[END_REF], locations that had been prioritized for conservation by SDMs based on species' occurrence only showed 10-58% overlap with locations prioritized by Species Abundance Models (SAMs) based on species' abundance. They conclude that SDMs do not typically identify locations of highest abundance that are crucial for the conservation of populations. Our results support this conclusion as we found no clear correlation between coarse-grain climatic suitability predicted by SDMs and local species' abundance. Since most conservation strategies are implemented at the local scale, we highlight the need to check predictions made at a global or regional scale and their transferability to the local scale, as previously proposed by [START_REF] Guerrero | Scale mismatches, conservation planning, and the value of social-network analyses[END_REF].

Another practical implication concerns rarity as a proxy for threat or conservation status. Our results indicate that for European plants, range size, especially when used as the only proxy for local abundance, seems to be a weak predictor of local rarity. Species with small ranges may be locally abundant, while those with large ranges may be locally rare. Thus, we argue that range size and local abundance should be independently considered when developing conservation measures for species or habitats.

In conclusion, we found conflicting evidence for some of the hypothesized links between species' coarse-grain distribution and local abundance, which may be due to the nature of dispersal barriers across Europe. In addition, we note that the size of the vegetation plots used can make species' abundance values more or less sensitive to local microhabitat variation and stochasticity. These results call into question any assumptions made on species' abundance at the local scale, particularly where predictive SDMs on coarse grain occurrence data were used. As such, we recommend that further detailed investigations of the processes driving species' local abundance in relation to their geographic range are required, particularly to better inform conservation measures.

Figure 1

 1 Figure 1 Hypothesized relationships between local abundance and: (a) the range or climatic niche derived at the coarse grain; (b) the vegetation plot centre) within the species' range in of a grid cell within which a local plot is situated in

  at 2.5 minresolution as explanatory variables to build SDMs. The distribution range data of CDH are pointpolygon maps covering the complete distribution of the recorded species. Apart from isolated or fragmented single occurrences (points), the areas outside the range polygons are proven to be 'absence areas' by accumulated regional expert knowledge, as documented in national to regional floristic atlases, floras or floristic inventories. Thus, pseudo-absences were sampled from bordering regions in geographical and climatic space. The general sampling approach is based on a climatic prestratification of the species' geographic range into differing climatic regions. A fixed number of presence and pseudo-absence samples were drawn randomly from each climatic region, irrespective of the size of the respective climatic region. As recommended by[START_REF] Barbet-Massin | Selecting pseudo-absences for species distribution models: how, where and how many?[END_REF], we kept the number of selected pseudo-absence samples equal to the number of presence samples for all models respectively (see Appendix S2.4 and 2.5).

Figure 2

 2 Figure 2 Range of Inula conyzae (grey) and locations of vegetation plots (blue dots) from EVA in (a) geographic and (b) climatic space. Centrality and predicted climatic suitability for Inula conyzae illustrated in blue (low centrality/suitability) to red (high centrality/suitability). The distance to range centroid in (c) geographic and (d) climatic space refers to the abundance-range centre relationship. The distance to niche centroid in (e) geographic and (f) climatic space refers to the abundance-range centre relationship. The predicted climatic suitability from the model 'random forest' (rf) in (g) geographic and (h) climatic space refers to the abundance-suitability relationship.

Figure 3

 3 Figure 3 Absence of a relationship between species' mean abundance with (a) range size and (b) niche size at coarse (2.5-min) raster grain. Points indicate species' mean abundance values; grey error bars are standard deviations, and black solid lines are linear regressions.

Figure 5

 5 Figure 5 Frequency distributions for 517 vascular plant species of slopes from OLS linear regressions (ols) (left) and linear quantile regressions (qr; 90 th percentile) (right) between mean species local abundance and distance to range centroid (a,b); distance to niche centroid (c,d), and climatic suitability predicted from model 'random forest' (rf) (e,f). Green bars represent significant slope values. The dotted line represents slope=0; the dashed line represents the average slope.

(

  distance to range centroid, distance to niche centroid, predicted climatic suitability from 'bioclim', 'mars', 'rf' and 'svm'); summary effect size (SE) is given in brackets; p-values: *= p < 0.05, ** = p < 0.01, *** = p < 0to link species' local abundance to their distribution at coarse resolution and broad extents in geographic and climatic space we tested for three macroecological relationships: (1) the abundance-range size relationship, (2) the abundance-range centre relationship, and (3) the abundance-suitability relationship.

Table 2

 2 Regression slopes derived from OLS linear regression models and quantile regressions (90th quantile) between species' local abundance and the six measures for distance and suitability applied (distance to range centroid, distance to niche centroid, predicted climatic suitability from 'bioclim', 'mars', 'rf' and 'svm') for 517 vascular plant species. The percentage of all 517 species included in this study showing significant (p < 0.05) positive, negative or no slope.

		Slope OLS linear regression	Slope linear quantile regression
					(90th quantile)
	Measure	[+] slope	[-] slope	[+] slope	[-] slope	no slope
	Geographic centrality	6.2	54.0	6.2	45.8	13.5
	Climatic centrality	3.9	32.5	4.3	23.4	24.1
	Suitability bioclim	13.0	34.6	10.4	29.0	17.7
	Suitability mars	17.2	22.8	11.8	18.8	14.7
	Suitability rf	13.5	24.2	8.5	17.6	20.9
	Suitability svm	10.8	28.0	7.4	22.6	14.6

[START_REF] Vanderwal | Abundance and the environmental niche: environmental suitability estimated from niche models predicts the upper limit of local abundance[END_REF][START_REF] Weber | Is there a correlation between abundance and environmental suitability derived from ecological niche modelling? A meta-analysis[END_REF][START_REF] Dallas | Habitat suitability estimated by niche models is largely unrelated to species abundance[END_REF][START_REF] Gomes | Species Distribution Modelling: Contrasting presence-only models with plot abundance data[END_REF][START_REF] Santini | Addressing common pitfalls does not provide more support to geographical and ecological abundant-centre hypotheses[END_REF] Hypothesized relationships between local abundance and: (a) the size of the geographic range or climatic niche derived at the coarse grain; (b) the vegetation plot position (i.e. distance to the species' range in either geographic or climatic space; and (c) the climatic of a grid cell within which a local plot is situated in the species' range in climatic space.[START_REF] Brown | On the relationship between abundance and distribution of species[END_REF][START_REF] Sagarin | The 'abundant centre' distribution: to what extent is it a biogeographical rule?[END_REF][START_REF] Sagarin | Moving beyond assumptions to understand abundance distributions across the ranges of species[END_REF][START_REF] Pironon | Geographic variation in genetic and demographic performance: new insights from an old biogeographical paradigm[END_REF] Santini et -Olvera et al., VanDerWal et al., 2009;[START_REF] Weber | Is there a correlation between abundance and environmental suitability derived from ecological niche modelling? A meta-analysis[END_REF] Dallas & Hastings, s et al., 2018;[START_REF] Santini | Addressing common pitfalls does not provide more support to geographical and ecological abundant-centre hypotheses[END_REF] of the geographic (i.e. distance to either geographic or climatic space; and (c) the climatic suitability

Data availability statement

All data are available as Supporting Information.

Funding information

Graduiertenförderung Sachsen-Anhalt (scholarship to MS), with additional support through institutional funds of Martin Luther University Halle-Wittenberg. PK received support from the German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig funded by the German Research Foundation (FZT 118). IB and JAC were supported by the Basque Government (IT936-16).

MC, AK and CM were supported by the Czech Science Foundation (19-28491X). SR was supported by the University of Latvia through grant funding (AAp2016/B041//Zd2016/AZ03). We acknowledge the financial support of the Open Access Publication Fund of the Martin Luther University Halle-Wittenberg.

Author contributions

MS and EW conceived the study with considerable input by HB and PK. GS harmonized data retrieved from EVA and CDH. MS carried out statistical analyses with support by GS. MS produced the graphs. The raw data will be openly available via Figshare once the manuscript is accepted for publication.

Metadata are already available via https://doi.org/10.6084/m9.figshare.11932740.v2 S4 Results from OLS linear regressions, linear quantile regressions and mixed-effect meta-analysis