dataesr/scientific-paragraphs-categorization huggingface dataset:
Highway Interchange Detection in Vector Datasets Usually, roads are modelled in geographic datasets with minimal semantics. But they are important features of most maps, not only topographic maps, because of their key role for transportation. This is why road network enrichment by spatial analysis has been an important topic for years in geographic information science  [14, 15, 16, 17, 18, 19]. Past research focused on various types of road structures and patterns: continuous road sections or strokes  [16] , complex crossroads  [15, 18] , ring roads  [14, 17] , grid-like patterns  [14, 17, 19] , dual carriageways  [19] , etc. Figure  1 : Illustration of the use case: finding the roads sections that belong to a highway interchange (in red here). Among these patterns and structures that are implicit in a network of road sections, highway interchange are particularly interesting (Figure  1 ).
The shape and the curvature of the road sections can also be used to detect interchanges  [18] , but in this work, the road network is already limited to highway sections plus slip roads thanks to an attribute value in the road dataset. When there is no semantic information on road direction or road function, two other methods exist in the literature to recognize the road sections that belong to a highway interchange, the second one being a specialization of the first one  [21, 22]. The method is based on the classification of each junction between two road sections according to their shape and their connectivity. For instance, y-shaped junctions are connected with three road sections that form angles similar to the shape of letter y. The first step of the detection method is to recognize the y-shaped or fork-shaped junctions.
Then, the second step is to cluster the close detected junctions using the distance in the road network as the clustering distance. Then, all the roads intersecting the convex hull of the large clusters are considered as belonging to a highway interchange. In this use case, the road data we work with is produced by the French national mapping agency 1  , and covers the whole French territory. In addition to the polylines, the road sections are labeled with an importance value that distinguishes highways from less important roads, but the sliproads that connect the network to the highway have varying importance values, which prevents from using this semantic information in the detection (Figure  3 ). In this dataset, we can also find an interesting geographic layer with the large complex junctions, which include some highway interchange, being represented with a point geometry (Figure  3 ).
This multiple representation of highway interchange is a key feature to automatically derive training datasets for machine learning  [13]. But only approximately half of the French highway interchange are considered as large junctions, so this information cannot really be used in the vector-based detection method. Figure  4  shows some results on the use case dataset with the existing vecotr-based method from  [22]. The results are generally unsatisfying. Around 40% of the interchange are correctly delineated, as in Figure  4a , but most interchange instances are identified but incorrectly delineated, as in Figure  4b ; there is even a significant part of the detected interchange instances that are in fact not highway interchange as in Figure  4c. These results confirm that a better method is required and the paradigm shift brought by CNNs gives that better method as shown in the following section.
We empirically selected a network close to LeNet-5 network that was proposed for handdrawn digits recognition  [24]. The version of the network we used is described in Figure  5. It can be noted that we added a dropout layer that reduces over-fitting, which was particularly important for the no-interchange images that can be more diverse than the ones with interchange, so the training images might not represent the diverse Figure  3 : The initial vector dataset for the use case: detailed roads, with an importance value conveyed by the color in the image (red is the most important). There are also points for a small part of the highway interchanges. patterns with enough instances. A dropout layer randomly drops out some of the units of the network to prevent co-adaptations during the early steps of training  [25].
Generating a Training Dataset As mentioned earlier, the dataset for this use case is composed of road line sections that cover the whole French territory, and of 2835 point that correspond to the most significant highway interchange of the country. We also have access to a complete topographic dataset, and we will see later that it will be useful to automatically generate the training dataset for our model. The first step is to generate the instances of the first class, i. e. the interchange images. We use the 2835 points to generate the same number of images of the interchange class. We generate images with 256*256 pixels with a scale of 1. 2 * 1. 2 km per image (Figure  6 ). This couple of values for image size and scale gives a good compromise between images that should be big enough to contain all the interchange roads, but small enough to make the vector-based detection effective.
The images are centered on the interchange point, and then randomly sligthly deviated from the center, as the images that the model will predict after training might contain interchanges near their border. We decided to generate black and white images with the background in black and the roads in white, with a 1 pixel width as road symbol. All these choices to generate the images are discussed in Section 5. Then, the second step is to generate the training examples of the second class, no-interchange. We need to generate images that do not contain any interchange. Rather than picking some random points in our road network, a more controlled process was used. First, tunnel points available in the dataset were extracted, and only the ones that do not have an interchange point around were kept.
Images were generated with the same process as with interchange points (Figure  7 ). The number of these points was not big enough, and the road network around tunnels, mostly located in mountainous areas, did not represent well the diversity of network structures. Then, school points that do not have an interchange point around were used, in order to have more points with more diverse network structures (Figure  8 ). Using these points, 3410 images were generated for the class no interchange. In terms of implementation, scripts using the Mapnik library 2  were developed to interact with the data stored in a PostGIS database. Mapnik is a library to generate tiled raster maps from geographic information, and can be easily hacked to generate images for deep learning. In order to process the vector data that is classified in the interchange class, keeping track of the original vector data, related to a given image, is necessary.
Results To test the model and the training dataset, we separated the images of each class randomly, keeping a little more than 1500 images in each class for the training phase, 500 in each class for testing during the training phase, and another 500 images in each class for a further assessment of the trained model. The presented results in this sub-section are all from these last 500 images of interchange and 500 without interchange. The model was implemented with the Keras Python library, with a TensorFlow core. The best results obtained with this dataset were ceiling around 96% of overall accuracy on the test data, so we added some data augmentation with random rotation of the input images, which yielded better results with 99. 6% of overall accuracy, with a loss of 0. 036, on the test data.
The first one is based on the vector-based method: the vector-based interchange detection is triggered on each vector extract corresponding to an image of the validation dataset and the extract is classified as "interchange" when there is at least one interchange instance detected, and "no-interchange" when there is none. The results of this baseline are presented in Table  3. The CNN classifier is clearly better than the vector baseline and the difference is even bigger, as expected, on the images that do not contain any interchange. The second baseline is also analysing the vector data and not its image, and uses a random forests classifier. We derived a set of descriptors of the vector road sections in each extract of the dataset. with the same train and test datasets, and then assessed on the same validation dataset.
We used the following descriptors in our baseline: • the number of intersections (as interchanges contain a high density of intersections); • the total length of roads in the extract (to describe the global density of the network); • the mean and the standard deviation of the road sections lengths; • the mean and standard deviation of the road sections sinuosity (the proxy for sinuosity used here is the distance between the extreme points of the polyline divided by the length of the polyline); • the total length of the road sections with maximum importance (as highways are mainly labeled with a maximum importance). This second baseline gives an accuracy of 88. 3% on the 500 extracts of the validation dataset, and the confusion matrix is presented in Table  4. The results of the second baseline are already way better than the first one, but once again, our proposed CNN model clealry outperforms this baseline.
Generating a Training Dataset In this case, a training example consists in an input image of the road network and a label image showing the pixels of the input image that belong to an interchange (Figure  12 ). We first used the same images as the ones in the classification model, but the results were not optimal so we changed the color model only, switching from black and white images to RGB images, with a white background and roads with colors corresponding to their importance value in the dataset. As highway interchange are usually around important roads, it helped improving the segmentation results a lot. Regarding the label images, they are black and white images where a white pixel means that the pixel does not belong to an interchange, and a black one means that the pixel belongs to an interchange.
Results The experiment setup was the same as the one for image classification: similarly to the classification experiment, we separated the images of each class randomly into train, test, and validation datasets; and the U-Net model was also implemented with the Keras Python library, with a TensorFlow core. The best results obtained after 30 epochs are the following: an accuracy of 97. 8% and a loss value of 0. 0696 on the training data, and an accuracy of 94. 3% and a loss value of 0. 3773 on the validation data. Figure  13 : Results of segmentation: the input images (top), and the predicted segmentation (bottom). Darker shades of grey correspond to higher probabilities of being part of the interchange. Figure  13  shows some good results on four of the interchange images of the test data.
And sometimes, the square is off-center (in the other three images). The previous two sections presented two deep learning models to detect highway interchanges in road networks that we trained with images derived from vector data. The way images are generated was determined empirically, and it might be sub-optimal. There are different variables on image generation: the scale and the resolution of the image, the style of the rasterized vector data, data selection, and the way the label area is created in the segmentation use case. In this section, we discuss different alternatives for these variables to generate the training images from vector data, and how they perform in our use cases.
Data Selection The last variable for the generation of input images is selection of the features of the dataset to render in the image. First, if we only focus on the roads to display in the image, there are different possibilities: • display only the n closest roads to the interchange point (this is the option chosen in our classification experiment with n = 200); • display all the roads that fall into the envelope of the image; • display only the most important roads; Figure  18  shows images where we selected only the closest roads with a different number of roads. The threshold of 200 roads was determined empirically, as the classification model trained with these images gave the best classification results. It can be explained by a balance between a good description of the network structure and the complexity of the image.
Segmentation Labels Regarding the segmentation problem, we tried different types of outputs to learn, all derived from the interchange point in our initial dataset. Figure  19  shows some of the labels we tested before selecting the one presented in Section 4. 2. All the method that use the roads in the label were the least effective, compared to the more abstract ones. We also compared the automatically created labels to labels segmented manually, on a very small number of examples (Figure  20 ). On this small number of examples, the manually segmented labels allowed much better results than our best automatic method (small black square on white background). Although such results cannot be generalized without experiments, we believe that a large amount of manually segmented would better train the segmentation model, which is not a suprise, but creating such a large manual training dataset is costly.
Conclusion and Future Work To conclude, the experiments presented in this paper show that deep learning greatly improves the detection of highway interchanges in vector road data. First, a simple image classification CNN model greatly reduces the number of false positive interchange detection when coupled with the vector-based detection method. Then, the U-Net segmentation model clearly improves the delineation of the interchange roads, even with an automatically generated training dataset. Beyond the progresses on this specific issue, the main contribution of this research is the exploration of different methods to generate images adapted to deep learning models from vector datasets. It opens up new perspectives on the use of deep convolutional networks for pattern recognition with vector spatial data.
There is a lot to do to go further. Regarding the use case on highway interchange, a first step would be to improve the training datasets used for the segmentation model by data augmentation. Another way to improve the training dataset is to use the vector-based method to find interesting areas in the network: it could add new interchange instances that do not have an interchange point in our dataset, and also add false positive cases, i. e. areas recognised as interchange by the vector-based method but are not, because it would help the model to learn how to process such cases. Another way to improve the training dataset is to add new instances. We already used all the instances in the French national mapping agency dataset, but we can use the worldwide OpenStreetMap dataset, where the features with the tag value "motorway_junction" for the tag "highway" (Figure  22 ).
Regarding the loss function, we used a basic binary cross entropy function, and we plan to test more functions such as the one proposed for the seminal U-Net  [27]  or overlap measures. In order to segment geometrically realistic delineations of the interchanges, it could also be interesting to test generative adversarial networks that perform well to generate realistic map images  [2, 31]. We also plan to test the model on other regions of the world that might present other types of interchange patterns. In addition to these tests on other regions, we want to try the model on other datasets (OpenStreetMap for instance) to check if there are some transfer learning issues. A straightforward follow-up to this work would be to use deep learning techniques to recognise other types of patterns in road structures, e.
Intergraph was developed as one of three technical demonstrators during the BLIZAAR project, a French-Luxembourgish research project dedicated to develop novel visualizations of dynamic multilayer graphs (https://blizaar. list. lu). BLIZAAR concentrated on a use case in biology and a principal use case in history. The targeted users in both cases were scholars with no or very limited experience with data analysis in general and network analysis and visualization in particular. The following section describes the principal use case in more detail, with its dataset and user requirements. "State of the art" section reviews the state of the art in the visualization of dynamic multilayer networks. "Intergraph" section presents the framework designed in response to the use case, and provides an overview of its main features.
Dataset and requirements The data is derived from resources on the European integration process since 1945 collected by the Centre Virtuel de la Connaissance sur l'Europe (CVCE) (https://www. cvce. eu), a former research and documentation center which in 2016 was integrated into the University of Luxembourg. The CVCE created a multilingual collection of approximately 25,000 digitized documents organized in 29 hierarchically structured thematic corpora. The documents differ significantly in nature: they include newspaper articles, diplomatic notes, personal memoirs, audio interview transcripts, cartoons and photos, all with descriptive captions. The histograph project  (Guido et al. 2016 ) processed a subset of circa 15,000 of these documents with named entity recognition (NER) and -disambiguation and stored links between entities and documents in a Neo4j graph database.
This dataset was made available to and further processed by the BLIZAAR project for the development of more advanced graph exploration prototypes. Figure  1  shows the BLIZAAR data structure with its nodes and relationships. Firstly, resources are part of one or more collections, from the highest logical unit of thematic corpora (ePublications) down to the corresponding hierarchical units and subunits; this is modeled by the "is_part_of " relationship. Secondly, named entities (people, locations, themes, institutions) have been extracted using named entity recognition software such as YAGO (Max-planck-institut fur informatik: YAGO) and TextRazor (The natural language processing API). This process enabled the generation of the "appears_in" relationship. Entities "co-appear" in resources, and collections "share" resources, by bipartite network projection  (Latapy et al.
2008; Zweig and Kaufmann 2011). Finally, a collection "mentions" an entity, and accordingly the entity "is_mentioned_in" the collection, if the collection contains at least one resource where the entity appears. Table  1  gives an idea of the size of the dataset. A previous study by the BLIZAAR project on visual analytics requirements for research in digital cultural heritage was published in  McGee et al. (2016). The authors suggest that the data structures supporting the analysis of a complex digital corpus, in which people, organizations, places, multimedia documents and document collections are connected across time, should best be modeled as a dynamic multilayer network. As a matter of fact, concerning the given dataset: • Nodes can be considered on at least three layers, a resource layer, an entity layer and a collection layer, and they have different relationships; • Nodes on the two latter layers have subtypes which can be treated as extra layers: entities are people, locations, institutions or themes, collections are ePublications, units or subunits; • Resources are time-stamped by their historical publication date.
The network therefore changes depending on the studied time period. Moreover, distinct time slices can also be regarded as defining separate layers. The definition of layers in this data model deliberately remains flexible (node types, node subtypes, time periods), and may depend on the user's research question and vision of the data. Also, note that compared to the framework of Kivela's universal model of multilayer networks  (Kivelä et al. 2014) , the BLIZAAR data does not possess multiple types of relationship between nodes. This network dimension has therefore not been considered for the rest of this paper. In view of the concrete dataset and the CVCE (subsequently the University of Luxembourg) acting as a collaborator and a stakeholder, the BLIZAAR project is an instance of problem-driven visualization research.
State of the art Network visualizations offer a unique way to understand and analyze complex data by enabling users to inspect and comprehend relations between individual units and their properties. Some scientific fields have been using network visualizations for a long time, most notably systems biology where purpose-built visualizations have been developed for more than twenty-five years  (Mendes 1993; Shannon et al. 2003; Pavlopoulos et al. 2008). Interactive network visualizations have been used in and around the digital humanities sphere to make datasets accessible for exploration and research  (Jänicke et al. 2015; Düring 2019; Jessop 2008; Boukhelifa et al. 2015; Düring 2013; Windhager et al. 2018 ) inasmuch as they offer novel search and discovery tools which enhance well-established techniques such as faceted search and keyword search.
2014). Multilayer networks can have multiple types of node  (Ghani et al. 2013) , with different attributes  (Kerren et al. 2014; Nobre et al. 2019 ) and different types of relationships  (Singh et al. 2007). Tulip  (Auber 2004 ) is a powerful graph visualization framework capable of embracing the complexity of multilayer data, however its configuration requires expertise in programming and network analysis and has a substantial learning curve for the user to obtain the intended visualization. The particularities of networks being both dynamic and multilayer have recently come to the attention of network science due to their importance for real-world applications. Multilayer networks open up new opportunities for the interactive exploration of (historical) datasets but also require novel types of data visualization  (Rossi and Magnani 2015).
In recent years, two collaborative European projects, Plexmath (2012-2015) (https://cordis. europa. eu/project/rcn/105293_fr. html) and Multiplex (2012-2016) (https://cordis. europa. eu/project/rcn/106336_en. html), were entirely dedicated to this topic, allowing to design a number of novel visualization methods (http://www. mKivela. com/pymnet, https://github. com/sg-dev/multinet. js)  (De Domenico et al. 2014; Piškorec et al. 2015). The tools published in the scope of these two projects have been primarily designed to demonstrate concepts and to illustrate universal approaches to dynamic multilayer graph visualizations. Given the lack of ongoing development and active support, their usability for the BLIZAAR use case given in this paper is problematic. A complete survey on current visualization solutions for multilayer graphs and their features, can be found in  Ghoniem et al.
(2019). Based on the BLIZAAR use requirements identified in the previous section, three feature sets were found to be essential for any adopted solution: 1 the swift creation of subgraphs from a larger dataset to support an iterative exploration workflow; 2 follow-up functionalities beyond selection, layout rearrangement or camera movement. In our case, this includes querying, generating, and juxtaposing related subgraphs and layers; 3 a flexible layer model which allows the user to switch between, and even to combine models (e. g. node type layers vs. time slice layers). To our knowledge there is no tool available which contains all three feature sets and allows their combination in exploratory workflows. This motivated the development of the Intergraph visualization platform which we describe in the following section.