Jude V Lane

Jana We

Stephanie Avery-Gomm

Elmar Ballstaedt

Ashley C Banyard

Tatsiana Barychka

Ian H Brown

Brigitte Brugger

Tori V Burt

Noah Careen

Johan Hf Castenschiold

Signe Christensen-Dalsgaard

Shannon Clifford

Sydney M Collins

Emma Cunningham

Jóhannis Danielsen

Francis Daunt

Kyle Jn D'entremont

Parker Doiron

Steven Duffy

Matthew D English

Marco Falchieri

Jolene Giacinti

Britt Gjerset

Silje Granstad

David Grémillet

Magella Guillemette

Gunnar T Hallgrímsson

Keith C Hamer

Sjúrður Hammer

Katherine Harrison

Justin D Hart

Ciaran Hatsell

Richard Humpidge

Joe James

Audrey Jenkinson

Mark Jessopp

Megan Eb Jones

Stéphane Lair

Thomas Lewis

Alexandra A Malinowska

Aly Mccluskie

Gretchen Mcphail

Børge Moe

William A Montevecchi

Greg Morgan

Caroline Nichol

Craig Nisbet

Bergur Olsen

Jennifer Provencher

Pascal Provost

Alex Purdie

Jean-François Rail

Greg Robertson

Yannick Seyer

Maggie Sheddan

Catherine Soos

Nia Stephens

Hallvard Strøm

Vilhjálmur Svansson

David Tierney

Glen Tyler

Tom Wade

Sarah Wanless

Christopher Re Ward

Sabina Wilhelm

Saskia Wischnewski

Lucy J Wright

Bernie Zonfrillo

Jason Matthiopoulos

Stephen C Votier

Deniau

Andrew Lang

Kathryn Hargan

High pathogenicity avian influenza (H5N1) in Northern Gannets: Global spread, clinical signs, and demographic consequences Authors

Keywords: HPAIV, avian flu, virus outbreak, seabirds, immunity

During 2021-22 High Pathogenicity Avian Influenza (HPAI) killed thousands of wild birds across Europe and North America, suggesting a change in infection dynamics and a shift to new hosts, including seabirds. Northern Gannets (Morus bassanus) appeared especially severely impacted, but limited understanding of how the virus spread across the metapopulation, or the demographic consequences of mass mortality limit our understanding of its severity. Accordingly, we collate information on HPAIV outbreaks across most North Atlantic gannet colonies and for the largest colony (Bass Rock, UK), provide impacts on population size, breeding success, adult survival, and preliminary results on serology. Unusually high numbers of dead gannets were first noted in Iceland during April 2022.

Outbreaks in May occurred in many Scottish colonies, followed by colonies in Canada, Germany and Norway. By the end of June, outbreaks had occurred in five Canadian colonies and in the Channel Islands. Outbreaks in 12 UK and Ireland colonies appeared to follow a clockwise pattern with the last infected colonies recorded in late August/September. Unusually high mortality was recorded at 40 colonies (75% of global total colonies). Dead birds testing positive for HPAIV H5N1 were associated with 58% of these colonies. At Bass Rock, the number of occupied sites decreased by at least 71%, .

Background

High Pathogenicity Avian Influenza Virus (HPAIV) H5Nx has negatively impacted wild and domestic bird populations globally for decades [START_REF] Nuñez | A review of H5Nx avian influenza viruses[END_REF]. However, the current global panzootic of H5Nx has seen shifts in both the seasonality of outbreaks and the species affected (EFSA, 2023).

H5Nx (A/goose/Guangdong/1/1996 (Gs/GD) H5N1) was first detected in 1996 on a domestic goose farm in Guangdong Province, China [START_REF] Xu | Genetic characterization of the pathogenic influenza A/Goose/Guangdong/1/96 (H5N1) virus: similarity of its hemagglutinin gene to those of H5N1 viruses from the 1997 outbreaks in Hong Kong[END_REF]. This goose Guangdong lineage (Gs/Gd) has since caused significant outbreaks in a variety of bird populations and has also raised concerns about the potential zoonotic consequences for humans [START_REF] Wan | Lessons from emergence of A/goose/Guangdong/1996-like H5N1 highly pathogenic avian influenza viruses and recent influenza surveillance efforts in southern China[END_REF], EFSA 2023). Genetic reassortment has led to the emergence and evolution of multiple subtypes and genotypes of this group of high pathogenicity viruses on a global scale, potentially with different epidemiological properties, especially with respect to host range in wild birds [START_REF] Monne | Emergence of a highly pathogenic avian influenza virus from a low-pathogenic progenitor[END_REF][START_REF] Falchieri | Shift in HPAI infection dynamics causes significant losses in seabird populations across Great Britain[END_REF]. The mechanism of viral transmission is likely a combination of infected wild bird migration and the global domestic poultry trade or their products [START_REF] Blagodatski | Avian Influenza in wild birds and poultry: Dissemination pathways, monitoring methods, and virus ecology[END_REF][START_REF] Ramey | Highly Pathogenic avian influenza is an emerging disease threat to wild birds in North America[END_REF].

Low Pathogenicity Avian Influenza Virus (LPAIV) is widely circulating in wild aquatic birds; Anseriformes (waterfowl) and Charadriiformes (shorebirds) are known to act as reservoirs [START_REF] Venkatesh | Avian Influenza Viruses in Wild Birds: Virus Evolution in a Multihost Ecosystem[END_REF] however, we know little about the recent emergence, spread and impact of HPAIVs in aquatic birds, including seabirds [START_REF] Burggraff | H5N1 infection causes rapid mortality and high cytokine levels in chickens compared to ducks[END_REF][START_REF] Falchieri | Shift in HPAI infection dynamics causes significant losses in seabird populations across Great Britain[END_REF][START_REF] Boulinier | Avian influenza spread and seabird movements between colonies[END_REF][START_REF] Roberts | Descriptive epidemiology of and response to the High Pathogenicity Avian Influenze (H5N8) epidemic in South African coastal seabirds[END_REF].

HPAIVs do not evolve within wild bird populations but once they have spilled into wild populations, are transmitted via infected saliva, nasal secretion and faeces but shedding methods differ between species and are not well understood [START_REF] Arnal | Laridae: A neglected reservoir that could play a major role in avian influenza virus epidemiological dynamics[END_REF][START_REF] Caliendo | Enterotropism of Highly Pathogenic avian influenza virus H5N8 from the 2016/2017 epidemic in some wild bird species[END_REF].

The winter of 2021/2022 saw a record number of confirmed cases of HPAIV H5N1 in poultry, captive and wild birds across Europe (EFSA 2023). HPAIV H5N1 was first detected in UK breeding seabirds in July 2021 when Great Skuas (Stercorarius skua) on Fair Isle, Scotland tested positive [START_REF] Banyard | Detection of Highly Pathogenic avian influenza virus H5N1 clade 2.3. 4.4 b in Great Skuas: a species of conservation concern in Great Britain[END_REF]. The first case of H5N1 detected in North American seabirds was a Great Black-backed Gull (Larus marinus) in Newfoundland and Labrador, Canada in November 2021, with phylogenetic analyses revealing the virus was of the European H5N1 lineage [START_REF] Caliendo | Transatlantic spread of Highly Pathogenic avian influenza H5N1 by wild birds from Europe to North America in 2021[END_REF]. In early April 2022, Common Eider (Somateria mollissima) was the first seabird species to test positive for HPAIV in the UK that year, followed in late April by Great Skua [START_REF] Falchieri | Shift in HPAI infection dynamics causes significant losses in seabird populations across Great Britain[END_REF]. Then followed an unprecedented epidemic in seabirds across the North Atlantic, with Northern Gannets (Morus bassanus; hereafter gannet), previously unknown to have been impacted by H5Nx, being severely impacted [START_REF] Cunningham | HPAI) into North Atlantic seabird populations: An interim report from the 15th International Seabird Group conference[END_REF].

Gannets breed in 53 colonies of various sizes (<10 to >60,000 breeding pairs and non-breeding immatures) on sea cliffs, stacks, and islands across both sides of the North Atlantic from Russia to north-eastern North America (d'Entremont et al. 2022a[START_REF] Jeglinski | Metapopulation regulation acts at multiple spatial scales: Insights from a century of seabird colony census data[END_REF]. During the breeding season, gannets are medium-range foragers capable of travelling more than 1000 km to find food [START_REF] Grémillet | Annual variation in diets, feeding locations and foraging behaviour of gannets in the North Sea: flexibility, consistency and constraint[END_REF]. Moreover, immature gannets travel greater distances than adults and prospect other colonies [START_REF] Votier | Inter-colony movements, at-sea behaviour and foraging in an immature seabird: results from GPS-PPT tracking, radio-tracking and stable isotope analysis[END_REF][START_REF] Votier | Effects of age and reproductive status on individual foraging site fidelity in a long-lived marine predator[END_REF][START_REF] Grecian | Understanding the ontogeny of foraging behaviour: insights from combining marine predator bio-logging with satellite-derived oceanography in hidden Markov models[END_REF]. During the non-breeding period, gannets are migratory with birds from Iceland and the eastern Atlantic occupying marine wintering grounds in UK waters, Iberia, with the majority wintering off the coast of West Africa [START_REF] Veron | The dispersal and migration of the Northern Gannet Morus bassanus from Channel Islands breeding colonies[END_REF][START_REF] Fort | Meta-population evidence of oriented chain migration in northern gannets (Morus bassanus)[END_REF][START_REF] Furness | Adult Gannet migrations frequently loop clockwise around Britain and Ireland[END_REF][START_REF] Deakin | Sex differences in migration and demography of a wide-ranging seabird, the northern gannet[END_REF]. Birds from the western Atlantic primarily winter along the coasts of the eastern United States of America south to the Gulf of Mexico, although some also winter off the coast of West Africa [START_REF] Fifield | Migratory tactics and wintering areas of Northern gannets (Morus bassanus) breeding in North America[END_REF]. Considering the oral-faecal spread of avian influenza viruses, opportunities for spread between gannets are most likely at the colony but may also occur at foraging grounds and wintering areas by birds in the early stages of infection [START_REF] Weber | Ecologic immunology of avian influenza (H5N1) in migratory birds[END_REF].

Globally, gannets are classified as Least Concern by the International Union for Conservation of Nature (IUCN) due to their wide distribution and growing populations in Europe and North America (IUCN 2023). The European population comprises 75-94% of the global population with 55.6% breeding in the UK (IUCN, 2023). The Bass Rock, Scotland (56• 6′ N, 2• 36′ W) is the world's largest gannet colony with an estimated 75,259 apparently occupied sites (AOSs) in 2014 [START_REF] Murray | The status of the gannet in Scotland in 2013-14[END_REF].

Understanding virus spread and infection outcome is essential to fully understand how the HPAIV outbreak impacted gannets and other seabirds. Here, we provide the first comprehensive assessment of the spatio-temporal occurrence of HPAIV outbreaks at most gannet colonies across their North Atlantic breeding range. Moreover, to better understand HPAIV transmission, immunity, and the potential for population recovery, we present detailed results from the largest gannet colony at Bass Rock, Scotland. We quantify how the 2022 HPAIV outbreak influenced adult survival and breeding success and present a non-invasive method that has the potential to determine exposure status based on iris colour.

Methods

a. Global context: HPAIV spread across the North Atlantic gannet metapopulation

We collated and mapped data on the timing of unusually high gannet mortalities (the earliest observations notable to fieldworkers familiar with their sites) at existing colonies across the global metapopulation as defined by [START_REF] Jeglinski | Metapopulation regulation acts at multiple spatial scales: Insights from a century of seabird colony census data[END_REF]. Colonies in Norway, Iceland and some Irish colonies were not monitored directly, but instead we gathered information on dead gannet sightings reported to the Norwegian Species Observation System (www.artsobservasjoner.no),)the Icelandic Food and Veterinary Authority and to the Department of Agriculture, Food and the Marine's (DAFM) Avian Check App (https://aviancheck.apps.services.agriculture.gov.ie/), and we associated these observations with the nearest gannet breeding colony. We also collated information on positive HPAIV tests associated with gannet colonies, based on data from the national testing laboratories for the relevant countries.

b. Case Study: Bass Rock

I. Health and safety and biosecurity

Strict biosecurity and health and safety measures were followed to ensure the safety of birds and field workers. During handling our Personal Protection Equipment (PPE) comprised coveralls, face masks, goggles, disposable aprons, and gloves. Safe4 disinfectant was used for disinfecting equipment and footwear (see Supplementary Online Material S1).

II. Impact of HPAIV on apparently occupied sites, breeding success and adult survival

Apparently occupied sites -A DJI Matrice 300 RTK unmanned aircraft system fitted with a DJI-Zenmuse L1 LiDAR and photogrammetry sensor was flown over the Bass Rock between 15:07-15:19 on 30 th June to count live and dead birds. All flights were conducted from the southern tip of the island with a Real-Time-Kinematic (RTK) base station, in good light with light winds (<5ms -1 ) enabling a flight speed of 4 ms -1 , with image sidelap of 70% and endlap of 80%. The resulting 102 images (captured with 0.001 of a second shutter speed and auto ISO) collected at an altitude of 100 m above ground level, were processed through Agisoft Metashape (Agisoft LLC, St Petersburg, Russia) to produce an orthomosaic of the Bass Rock with a ground sampling distance of approximately 3 cm (see Supplementary Online Material S2). The composite image was loaded into DotDotGoose version 1.5.3 (DotDotGoose (amnh.org)) to allow manual counting of birds on the colony. White birds were presumed to be adults but could not be distinguished from 4-5-year-old immatures. Birds were considered dead based on spread wings or contorted body shape, or alive if their posture was apparently natural or too indistinct to see. Breeding success -We monitored 93 active nests in two study sites, during 14 visits between 15 th June and 14 th August 2022. All nests had an egg on the first visit, those with a chick on 14 th August were considered successful.

Adult survival -Visual searches for 370 colour-ringed adults (marked during 2010-2021) took place weekly (total of 12 days) from 15 th June until 30 th July 2022. Nest sites of colour-ringed birds were repeatedly scanned from a distance of between ~5-30m and the ring sequence of each bird recorded during a total of ~11 person-observation hours each day.

We constructed annual encounter histories for each marked bird using resighting data from July 2022 and from visits made in July 2011-2021. A goodness-of-fit test (GOF) showed that a fully timedependent (both survival (ϕ) and resighting (p) probabilities vary with time) Cormack-Jolly-Seber (CJS) model did not fit the data well (GOF: χ 2 34 = 73.33, P = <0.01) with evidence of trap dependence (TEST2.CT; z = -6.1484, two-sided test, p <0.01) but no evidence for transience (TEST3.SR; z = -1.9044, two-sided test, p = 0.056). After accounting for trap-dependence a variance inflation factor (ĉ) of 1.212 was estimated by U-CARE [START_REF] Choquet | U-CARE: utilities for performing goodness of fit tests and manipulating Capture-Recapture data[END_REF]). Therefore we set ĉ = 1.212 to account for the overdispersion in the data and a two-stage TSM structure was applied to model re-sightings.

Models were specified in MARK (Version 9.0, White and Burnham 1999) with the candidate model set (n=4) built so that the survival and resighting probability parameters could vary with year (t) or remain constant over time (c).

III. Serology and iris colour

During September 2022 we caught 19 apparently healthy chick-rearing adults and took ~1 ml of blood from the tarsal vein (under licence from the UK Home Office; Project licence number PEAE7342F).

Sampling effort focused on catching equal numbers of birds with healthy and abnormally black irises, seen for the first time during the outbreak. Birds were caught from seven distinct locations to minimise potential bias in virus exposure between clusters of nests. Where possible, birds with chicks were caught preferentially to guarantee that they had been present throughout the HPAIV outbreak. Birds without chicks were caught if they appeared to be holding a territory.

We took external cloacal swabs from 18 of the 19 birds to test for any possible asymptomatic HPAI infection. Blood and cloacal swabs were stored in a cool bag with ice blocks in the field, then stored at ~4o C before being transported directly to the UK reference laboratory for avian influenza at the Animal and Plant Health Agency (APHA). Blood samples were tested for an indication of previous infection using an hemagglutination inhibition assay to detect antibodies to H5 avian influenza virus (clade 2.3.4.4b) using a viral antigen homologous to the outbreak virus. Swabs were first tested for influenza A virus nucleic acid following RNA extraction using a matrix (M) gene-specific real-time reverse-transcriptase polymerase chain reaction (rRT-PCR) assay [START_REF] Nagy | A universal RT-qPCR assay for "One Health" detection of influenza A viruses[END_REF]) and a HPAIV specific H5 PCR assay [START_REF] James | Rapid and sensitive detection of high pathogenicity Eurasian clade 2.3.4.4b avian influenza viruses in wild birds and poultry[END_REF]. Unless already ringed, birds were fitted with a metal British Trust for Ornithology (BTO) ring and a blue plastic darvic ring engraved with a unique alphanumeric code to allow future identification. A Fisher's exact test was used to determine the associations between iris colour and exposure status.

Statistics were performed using R 4.1.1 (R Development Core Team 2007).

Results

a. Global Context: HPAIV spread across the North Atlantic gannet metapopulation

We gathered evidence of HPAI occurrence for 41 colonies. Unusually large numbers of dead gannets were detected at 40 of 53 colonies during the breeding season, only one colony (Bjørnøya) was not affected, and 12 colonies were not monitored (Figure 1). Positive H5N1 samples were associated with 24 of the 41 sampled colonies (58%), either through direct sampling of dead gannets from the colony or by proximity of dead gannets to colonies. A small colony at Store Ulvøyholmen, Norway (330 Apparently Occupied Nests (AONs) in 2015, [START_REF] Barrett | On the polar edge: the status of the northern gannet (Morus bassanus) in the Barents Sea in 2015-16[END_REF]) was reported abandoned (Børge Moe, pers comm) and, since dead gannets were reported close to the colony, this may have been due to HPAI. One gannet sample from a bird found dead at Kjelmøya (Norway) tested positive for H5N5.

The earliest outbreaks occurred in the northeast Atlantic in Iceland (at Eldey, Brandur and Raudinupur during 15 th , 17 th and 26 th April), followed by Shetland, Scotland (Noss and Hermaness on 1 st and 4 th May, respectively) then the Outer Hebrides, Scotland (St Kilda, 10 th May). Subsequent outbreaks appeared to occur from early June in southern Norway (Runde, 8 th June). The concurrent, southwards progression occurred along the east coast of the UK (e.g., Troup Head, 20 th May, Bass Rock 4 th June).

By mid-June, there were HPAIV outbreaks in northern Norway (Syltefjord, 16 th June), the southern North Sea (Heligoland, 21 st June), the Channel Islands (Les Etacs and Ortac, 28 th June) and the southernmost colony Rouzic, France (1 st July). In July and early August, signs of HPAI appeared in northwest Norway, the Faroe Islands (Mykineshólmur, 7 th July) and in a clockwise progression around the UK, followed by Wales (Grassholm, 21 st July) and then in Ireland (Clare Island, Lambay, Bull Rock, Little Skellig, Great Saltee, Ireland's Eye; 10 th , 25 th , 26 th , 31 st August, 1 st and 12 th September respectively). The northernmost colony Bjørnøya (52 AON in 2016, [START_REF] Barrett | On the polar edge: the status of the northern gannet (Morus bassanus) in the Barents Sea in 2015-16[END_REF]) appeared unaffected by HPAIV. No information was available for several remote colonies in the west and northwest of Scotland but unusually high mortality at Sule Skerry was detected after the breeding season in October (Wanless and Harris, in press).

The outbreaks in the northwest Atlantic metapopulation developed in parallel to these in the northeast, with the earliest outbreaks occurring between early and mid-May in the three colonies in the Gulf of St. Lawrence (at Rochers aux Oiseaux, Magdalen Islands, 1 st May and, Le Bonaventure, 20 th May) followed by the colonies in Newfoundland throughout June (Cape St. Mary's, 6 th June, Baccalieu Island, 17 th June, and Funk Island, 24 th June).

b. Case Study: Impact of HPAIV on Bass Rock

Unusually high gannet mortality during incubation in early June 2022 was the first suggestion of an HPAIV outbreak at the Bass Rock and subsequent testing of four carcasses from 4 th June proved positive for clade 2.3.4.4b HPAIV H5N1.

I. Impact of HPAIV on apparently occupied sites, breeding success and adult survival

Apparently occupied sites -A total of 21,227 live birds were counted on the 30 th June 2022. An additional 5,035 birds were identified as dead, approximately 3.3% of the breeding population (assuming 150,518 breeding adults from 75,259 AOS, [START_REF] Murray | The status of the gannet in Scotland in 2013-14[END_REF], however, many additional birds will have died at sea. Given the almost complete absence of immatures and non-breeders at the colony during June, it is highly likely that the majority of birds counted, both live and dead, would have been breeding adults.

Breeding success -Monitored nests declined from 93 to 23 (75% decline) between 15 th June and 14 th August. However, empty nest sites on the 15 th June indicated nests had already failed prior to the start of monitoring (Figure 2). The majority of the 93 nests had failed by the beginning of July with nest abandonment leaving gaps within the colony (Figures 2 and3). An index of breeding success was estimated as 0.247 based on the presence of 23 large, apparently healthy chicks in the study areas on the 14 th August. Clinical signs of viral infection, seizures, and lethargy were observed in a small number of chicks (aged 2+ weeks) outside of our study areas, but since they were not monitored their fate is unknown.

Adult survival -The top model showed strong support for survival probability varying with time and for re-sightings to vary with time following the first year after marking (Table 1). Adult survival between 2021 and 2022 was 0.455 (95% CI: 0.153 -0.794) compared with an average annual survival of 0.940 (SD 0.035) between 2011 and 2021. The resighting probability during 2022 was 0.615 (95% CI: 0.144 -0.938) compared with an average of 0.839 (SD: 0.066) between 2011 and 2021.

Seven colour-ringed birds were found dead during June and July 2022 on the North Sea coasts of the UK, Sweden and Denmark, and eight were found dead on the colony in October, compared with 3 dead recoveries between 2015 and 2021.

. CC-BY-NC-ND 4.0 International license made available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is

II. Serology and iris colour

All 18 birds tested negative for viral nucleic acid from cloacal swabs, indicating they were not currently infected. Of the 19 blood samples, two were insufficient for testing and eight tested positive for H5 antibodies indicating a previous infection.

Black irises -instead of the usual pale blue -were first noted on 15-16 th June 2022. Iris colour varied from completely black to mottled and with some variation between eyes and did not present like a dilated pupil (Figure 4). The likelihood of testing positive for HPAIV H5 antibodies was higher in birds with black irises (77.7%) compared to birds with normally coloured eyes (12.5%; Fisher's exact test; p <0.05). The hemagglutinin (HA) binding antibody levels in serum samples, as detected by a Haemagglutination Inhibition (HAI) titre, were 1/16 (n = 3) and 1/32 (n = 5, including the sample from the bird with healthy irises) (Table 2 and Supplementary Online Material, Table S2). Although a thorough estimation of gannet mortality during the 2022 HPAIV outbreak is beyond the scope of the paper, we document the spread of the HPAIV outbreak and provide details on impacts at the largest gannet colony. Following the first confirmed cases in Iceland during April 2022, HPAIV was detected almost simultaneously across the northeast and northwest Atlantic metapopulations. HPAIV outbreaks, confirmed and inferred from dead untested birds, occurred in at least 75% of all 53 known gannet colonies. While gannets are a well-studied species, we note that sampling effort was not standardised among colonies (e.g. uncertainty in data from northern Norway, Iceland and some of the Irish colonies is largely due to the use of passive surveillance data rather than direct colony monitoring), but we have no reason to believe this leads to an inaccurate representation of the timing of HPAIV outbreaks.

Discussion

b. Possible mechanism of HPAIV transmission between gannet colonies

The scale and speed at which HPAIV spread through the gannet metapopulation was dramatic, but the mechanism of transmission and the subsequent spread between colonies is unclear. A possible source may have been infectious gannets returning from their wintering areas. During the spring migration, gannets in the eastern North Atlantic frequently perform a clockwise loop around the UK, with Icelandic breeders arriving earlier than those breeding on the Bass Rock [START_REF] Furness | Adult Gannet migrations frequently loop clockwise around Britain and Ireland[END_REF].

However, gannets from different colonies overlap to some degree in the wintering areas [START_REF] Fort | Meta-population evidence of oriented chain migration in northern gannets (Morus bassanus)[END_REF][START_REF] Furness | Adult Gannet migrations frequently loop clockwise around Britain and Ireland[END_REF], making the sequential nature of the spread less likely due to differences in migratory timing. Yet an unprecedented stranding of dead adult gannets on the Dutch coast prior to the start of the breeding season in April 2022 potentially indicates HPAIV exposure over the previous winter although none of these birds were tested [START_REF] Camphuysen | Avian influenza panzootic leads to mass strandings of Northern Gannets Morus bassanus in the Netherlands[END_REF].

The timing of outbreaks on each side of the Atlantic and throughout the northeast metapopulation, might point towards HPAIV transmission via other infected seabirds. Great Skuas [START_REF] Grecian | Seabird diversity hotspot linked to ocean productivity in the Canary Current Large Marine Ecosystem[END_REF] were severely affected by HPAIV H5N1 in Scotland in 2021 [START_REF] Banyard | Detection of Highly Pathogenic avian influenza virus H5N1 clade 2.3. 4.4 b in Great Skuas: a species of conservation concern in Great Britain[END_REF]) and again in 2022 (Camphuysen et al. 2022[START_REF] Falchieri | Shift in HPAI infection dynamics causes significant losses in seabird populations across Great Britain[END_REF]. Great Skua breed in close proximity to gannets in Iceland, the Faroes and northern Scotland (Birdlife International, 2023) and overlap with the winter range of gannets from both sides of the North Atlantic [START_REF] Magnusdottir | Wintering areas of great skuas Stercorarius skua breeding in Scotland, Iceland and Norway[END_REF][START_REF] Fifield | Migratory tactics and wintering areas of Northern gannets (Morus bassanus) breeding in North America[END_REF].

Great Skua regularly kleptoparasitise gannets (Anderson 1976) which in addition to transmission via faeces and respiratory secretions could explain the spread across taxa. Brown Skuas (Stercocarius antarcticus) are likely vectors of avian cholera on Amsterdam Island, Indian Ocean [START_REF] Gamble | Predator and scavenger movements among and within endangered seabird colonies: Opportunities for pathogen spread[END_REF] and we speculate a similar role for Great Skuas triggering the HPAIV outbreak in gannets in 2022. Yet this does not explain the subsequent spread through the gannet metapopulation, and questions remain about why spill-over into gannets may or may not have occurred during the 2021 outbreak among skuas. Similarly, waterfowl and gull species have been found to play an important role in intercontinental transmission of LP and HPAIVs via Iceland, the link between the East Atlantic and North American Atlantic Flyways (Duesk et al. 2014). Gulls are known to frequent seabird colonies to opportunistically prey on eggs and chicks [START_REF] Donehower | Effects of gull predation and predator control on tern nesting success at Eastern Egg Rock, Maine[END_REF], pers obs) and may therefore have played a role in virus spread.

The subsequent clockwise spread around the UK seems unlikely to be linked to centrally-placed adults foraging at sea, based on current evidence. During chick-rearing, gannets have colony-specific foraging ranges with limited overlap [START_REF] Wakefield | Space partitioning without territoriality in gannets[END_REF]) and tend to have individual specific foraging grounds [START_REF] Wakefield | Long-term individual foraging site fidelity--why some gannets don't change their spots[END_REF][START_REF] Votier | Effects of age and reproductive status on individual foraging site fidelity in a long-lived marine predator[END_REF]. However, the HPAIV outbreak may have altered their movement behaviour leading to an increased inter-colony contact (Jeglinski et al. in prep; d'Entremont and Montevecchi unpubl. data). Immature gannets are another possible route for spreading the virus while prospecting among colonies [START_REF] Votier | Inter-colony movements, at-sea behaviour and foraging in an immature seabird: results from GPS-PPT tracking, radio-tracking and stable isotope analysis[END_REF]. They also have larger foraging ranges than breeders [START_REF] Votier | Effects of age and reproductive status on individual foraging site fidelity in a long-lived marine predator[END_REF][START_REF] Grecian | Understanding the ontogeny of foraging behaviour: insights from combining marine predator bio-logging with satellite-derived oceanography in hidden Markov models[END_REF], and therefore a greater chance of inter-colony overlap. Nevertheless, immature gannets tend to return to the colony much later than adults, being scarce during April-May and only appearing in large numbers during June/July [START_REF] Wanless | Seasonal variation in the numbers and condition of gannets Sula bassana dying on Ailsa Craig[END_REF][START_REF] Nelson | The Atlantic Gannet[END_REF], so were unlikely to have played a role during outbreaks during April and May, though they may have played a role during outbreaks later in the breeding season (Figure 1). More research into virus incubation and length of infectious period in addition to possible transmission pathways between species that overlap in their wintering, migratory and breeding areas is paramount [START_REF] Hill | Ecological divergence of wild birds drives avian influenza spillover and global spread[END_REF].

c. Case Study: Impact on Bass Rock Gannet Colony

Drone footage on 30 th June recorded 5,035 dead individuals that represented ~3% of breeding adult gannets on Bass Rock. This is likely an underestimate as it excludes decomposed birds or those that died at sea and does not account for the colony growth since 2014 [START_REF] Murray | Gannets and tree mallow -change on the Bass Rock[END_REF]. This figure compares with an estimated 7% mortality at Mykineshólmur, Faores (unpublished) and 6% at Sule Skerry, Scotland (Harris and Wanless, in press), both from aerial counts although the Sule Skerry count was performed at the end of the breeding season. Drone counts in late June indicate that the colony was ~71% smaller than during the last full colony count in 2014 [START_REF] Murray | The status of the gannet in Scotland in 2013-14[END_REF]. However, the colony had grown since 2014 [START_REF] Murray | Gannets and tree mallow -change on the Bass Rock[END_REF]) so again, this is almost certainly an underestimate, though note that different methodologies and counting units make a direct comparison difficult.

Around one quarter of nests with an egg on 15 th June still had a chick in late August, which is much lower than the mean UK gannet breeding success during 1961-2018 (mean ± standard deviation) 0.72 ± 0.12 [START_REF] Jeglinski | Metapopulation regulation acts at multiple spatial scales: Insights from a century of seabird colony census data[END_REF]. There are methodological differences in approach, but the comparison provides a further indication of the severe impact of the virus. The primary cause of breeding failure appeared to be nest abandonment, either when adults did not return from foraging trips or died at the nest.

Adult survival was approximately 42% lower than the average of 0.940 (SD 0.035) between 2011 and 2021. The reduction in the number of re-sighted colour-ringed birds indicates that a large proportion of adults have died, but a full assessment of the impact on adult survival will have to wait until 2023 when visual searches will be made for returning birds. Similar to most seabirds, gannets are a longlived species making their populations particularly sensitive to changes in adult survival therefore the consequences of a significant reduction in adult survival could be considerable (Croxall & Rothbury, 1991).

Despite a modest sample size, our study suggests that gannets infected with HPAIV H5N1 can survive, with important implications for the long-term consequence of the virus impact. We also found that black iris coloration in otherwise apparently healthy gannets is a likely indicator of prior infection. One seropositive bird had healthy irises, but this may be related to a different subtype of HPAIV or LPAIV [START_REF] Wilson | High seroprevalence of antibodies to avian influenza viruses among wild waterfowl in Alaska: Implications for surveillance[END_REF], to waning antibody levels following prior infection, or may suggest that not all infected birds develop black irises. We suggest the two birds with black irises that tested negative for antibodies had previously been infected but had already lost the antibodies, however further investigation is needed to inform on antibody persistence. Black eyes have been reported in gannets once before, but the reason is unknown (J. Swales pers comm., [START_REF] Balfour | Varieties of the common gannet[END_REF]. During the HPAIV outbreak in 2022, gannets with black irises were also reported from colonies in the UK (Bempton Cliffs, Grassholm and Ortac), France (Rouzic), Germany (Heligoland) and Canada (île Bonaventure). In early spring 2023, gannets with black irises were observed at the Bempton Cliffs, Bass Rock, Troup Head, Rouzic and Les Etacs colonies, suggesting the potential for a longer-lasting or even permanent modification of the iris.

Recommendations

Future research should quantify changes in demography (i.e. population size, adult survival and breeding success) of gannets and other impacted seabirds while also assessing whether previously infected birds have developed immunity in order to model disease progression and long-term impacts of HPAIV (Hill et al. 2019). Additionally, assessments of infection and mortality rates in different age classes, and of how previous infection might influence fertility or the outcome of a second infection are also needed [START_REF] Wilson | High seroprevalence of antibodies to avian influenza viruses among wild waterfowl in Alaska: Implications for surveillance[END_REF]). Juvenile gannets have been found to carry antibodies to HPAIV (Grémillet et al. in prep) but it is unknown whether these were maternally derived or produced in response to infection [START_REF] Devriese | Passive protection afforded by maternally-derived antibodies in chickens and the antibodies' interference with the protection elicited by avian influenza-inactivated vaccines in progeny[END_REF].

Black irises may provide a useful non-invasive diagnostic tool, more work is required to better understand its efficacy, if it applies to any other species, and whether there are any potential costs in terms of vision. Ophthalmology exams or histopathology examinations are also required to determine what is causing the black colouration. It is also desirable to better understand the circulation of LPAIVs and prior exposure to antigenically related HPAIV sub-types in seabird populations to better understand potential cross-protective immunity, as well as the potential for compensatory recruitment to offset mortality [START_REF] Votier | Recruitment and survival of immature seabirds in relation to oil spills and climate variability[END_REF][START_REF] Jeglinski | Metapopulation regulation acts at multiple spatial scales: Insights from a century of seabird colony census data[END_REF].

If sampling for live virus, we recommend cloacal swabs be taken in conjunction with oropharyngeal swabs (Suarez et al. 2000, van den Brand et al. 2018) because of possible differences in virus genotype detectability (Slomka et al, in prep). Primary flight feathers can also be used as a diagnostic indication of systemic viral infection as infectious virus can be detected in these samples [START_REF] Nuradji | A comparative evaluation of feathers, oropharyngeal swabs, and cloacal swabs for the detection of H5N1 highly pathogenic avian influenza infection in experimentally infected chicks and ducks[END_REF].

The 2022 HPAIV H5N1 outbreak has provided another significant stressor to those already faced by our rapidly declining seabird populations [START_REF] Dias | Threats to seabirds: A global assessment[END_REF][START_REF] Careen | Avian influenza (H5N1) and a marine heatwave spell reproductive disaster for Northern Gannets at their southernmost colony[END_REF]) -quantifying and perhaps even mitigating its impact is therefore crucial if we hope to see a healthy seabird assemblage across the world's oceans.

  a. Global Context: HPAIV spread across the North Atlantic gannet metapopulation During summer 2022 HPAIV H5N1 was recorded for the first time in gannets, causing mortality on an unprecedented scale across their entire Atlantic breeding range. Positive tests from 58% of monitored colonies mean it is likely that unusually high mortality in the 16 untested colonies in 2022 was due to HPAI. Of the 41 colonies monitored, only one was confirmed to have been unimpacted/unaffected. Strong evidence of an HPAIV outbreak at a colony unmonitored during the breeding season, Sule Skerry, northern Scotland (Harris and Wanless in press) suggests it is likely some of the 12 remote unmonitored colonies were also affected. All positive samples collated across the northeast and northwest Atlantic metapopulations were subtype H5N1 apart from a single gannet sample testing positive for subtype H5N5 from the Sør-Varanger municipality in Troms and Finnmark county, Norway. In Norway, Subtype H5N5 has also been detected in 30 birds from different species, including White-tailed Eagles, gulls (Laridae), Great Skuas and corvids (Corvidae) (S. Granstad, personal communication, March 26, 2023).

FiguresFigure 1 :

 1 Figures

.Figure 2 :

 2 Figure 2: The number of active nests within two study areas on Bass Rock; area 1 in blue, area 2 in yellow. Dotted vertical line indicates 4 th June, the date carcasses were collected for testing by the Animal Plant Health Agency (APHA).

Figure 3 .

 3 Figure 3. Nest failures, apparent from gaps between birds, and dead birds in study area 2 of the Bass Rock on (a) 15 th June and (b) 30 th June, (c and d) study area on 29 th April 2022 and 23 rd July 2020 showing typical nest spacings and densities for the respective time of year; (c) pre-laying and (d) mid-chick rearing. Coloured dots in a) and b) indicate the status of the bird; red -dead, greenvisibly sick, yellow -active nest with healthy adults, dark blue -non-breeding healthy adults, light blue painted rocks delineate a path.

Figure 4 .

 4 Figure 4. Gannets on the Bass Rock colony in 2022 with black flecking in their irises. The condition was variable between individuals from a) healthy, b and c) increasing degrees of black flecks in the iris d) completely black iris, and asymmetrical irises affected to e) greater and f) lesser extents. No pattern was detected in the asymmetry of black irises.

  (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is

	bioRxiv preprint	doi:	; https://doi.org/10.1101/2023.05.01.538918	this version posted May 1, 2023.	The copyright holder for this preprint
			. CC-BY-NC-ND 4.0 International license made available under a

Table 2 .

 2 Serological results from 17 adult gannets from Bass Rock tested for H5 antigen.

		HPAI H5 antibody status
		Positive	Negative
	Black	7	2
	Iris condition
	Healthy	1	7

This work was funded by the Forth and Tay Offshore Wind Farm Developers; Neart na Gaoithe Offshore Wind Ltd, Seagreen Wind Energy Ltd and SSE Renewables, the Animal Plant Health Agency, and the UK Department for Business, Energy and Industrial Strategy Offshore Energy Strategic Environmental Assessment BEIS OESEA programme, as well as a NERC Urgency Grant NE/X013502/1 and Natural Sciences and Engineering Research Council of Canada (NSERCC) and Fisheries and Oceans Canada. ACB, JJ, TL and IHB were part supported by the Biotechnology and Biological Sciences Research Council (BBSRC) and Department for Environment, Food and Rural Affairs (Defra, UK) research initiative 'FluMAP' (grant number BB/X006204/1). Funding was also provided by the Defra and the Devolved Administrations of Scotland and Wales, through grants SE2213 and SV3006. UAV . CC-BY-NC-ND 4.peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is data collection was undertaken by the University of Edinburgh's Airborne Research and Innovation facility (ARI), the NERC Field Spectroscopy Facility (FSF)) and Scotland's Rural College (SRUC), in partnership with the Scottish Seabird Centre.

We thank Sir Hew Hamilton-Dalrymple and the Scottish Seabird Centre, North Berwick for support and access to Bass Rock, and Jack Dale and John McCarter for logistic support. We thank Esbern í Eyðanstovu for, for making the observations of Mykineshólmur available to us. We thank Armel

Conflict of Interest

The authors confirm that they have no conflicts of interest.

Tables


Aymeric Koenig
email: aymeric.koenig@imt-nord-europe.fr

Benjamin Allaert
email: benjamin.allaert@imt-nord-europe.fr

Emmanuel Renaux
email: emmanuel.renaux@imt-nord-europe.fr

NEURAL-UML: Intelligent Recognition System of Structural Elements in UML Class Diagram

Keywords: Deep learning, Computer vision, object recognition, UML design, class diagram

Design models are essential for many tasks in software engineering, such as consistency checking, code generation and design-to-code tracing. Unfortunately, many UML class diagrams are stored as images, which limits their use and evolution. It is therefore important to identify the semantic elements of design models from images. Although a number of studies focus on the recognition of a UML class diagram, very few address semantic analysis, which is a relatively complex task. In this paper, we propose a framework for training a learning model to categorise and locate semantic elements in class diagram from an image. A large set of annotated design models is proposed and made available online. Qualitative and quantitative evaluations have been carried out on two subsets of data, giving accuracy scores of 92.59% and 94.11% respectively. Evaluations highlight the ability of the proposed learning model to generalise to a wide range of examples.

I. INTRODUCTION

The UML class diagram design process is a way of modeling and conceptualizing a complex idea. However, the conceptualization process is often carried out by several collaborators, using a variety of supports, e.g., discussion, drawing or postit notes. Although this facilitates exchanges, a transcript step in UML modeling software is often necessary to preserve a standardized written track that can be interpreted by all. This is at the expense of a significant investment of time. In many cases, UML class models and their evolutions are rarely retrieved during the life of a project.

With the rise of neural networks, and their ability to generalize complex problems, it is conceivable to propose systems for interpreting and modeling UML class diagrams from a non-standardized source. Many recent studies focus on classifying UML diagrams according to their type (i.e., class, sequence, activity, etc), without focusing in depth on UML concepts [START_REF] Wang | Uml diagram classification model based on convolution neural network[END_REF]- [START_REF] Chen | Automatically recognizing the semantic elements from uml class diagram images[END_REF]. However, to correctly interpret a UML class diagram, it is important to perform several tasks: 1) component detection, e.g., classes and type of relationships; 2) class content extraction, e.g., name, attributes and operations; 3) relationships between classes. To train a learning model to perform these tasks, annotated datasets are required. However, the great variability of perspectives of class diagram (i.e., conceptual, specification or implementation) and graphical format, depending on the tools used or the nature of the diagrams, e.g., manuscript, pdf or post-it, tends to increase the complexity of dataset creation and the annotation task. In this paper, we focus on the task of detecting and recognizing classes and type of relationships in a UML class diagram. Our proposed framework is illustrated in Fig. 1, and is based on two main contributions:

• A new annotated learning dataset based on a public data collection [START_REF] Hebig | The quest for open source projects that use uml: mining github[END_REF] are proposed to train a learning-based model to recognize classes and the six relationship types: Association, Inheritance, Aggregation, Composition, Dependency and Realization in a class diagram in image format. A scraping approach, combined with a pre-trained learning model proposed by Ho-Quang et al. [START_REF] Ho-Quang | Automatic classification of uml class diagrams from images[END_REF], is used to extract only UML class diagrams from a large collection of diagrams.

• A new learning-based approach is proposed, for interpreting various UML diagrams, i.e., designed by several modeling tools, in image format. The system is evaluated according to several metrics as the intersection over union (IoU) and the score-F1 to verify its accuracy. This paper is structured as follows: Section II presents a litterature on the various existing datasets for analyzing UML class diagrams, and on the learning-based approach used to interpret these diagrams. The proposed framework for designing the dataset, and to create the learning model is explained in Section III. Section IV contains the various evaluations carried out to validate the effectiveness of the proposed learning model. A discussion and a conclusion is given in Section V.

II. RELATED WORK

Interpreting a UML class diagram is a complex task that requires consideration of several elements, such as its graphical components, textual content and relational structure. In the literature, two points are generally addressed: 1) intelligent system design relying on feature extraction techniques to analyze the content of a UML diagram; 2) dataset design to train and evaluate these systems.

A. Categorise and localize semantic elements

Among semantic analysis methods focusing on detecting the elements that compose a UML diagram, there are few handcrafted vision-based techniques. Mennesson et al. [START_REF] De-Wyse | Using sketch recognition for capturing developer's mental models[END_REF] use Hough transform method with an SVM classifier to encode the geometry of elements such as classes and relations. Other approaches focus on textual content analysis. Perianez-Pascual et al. [START_REF] Perianez-Pascual | Towards the optical character recognition of dsls[END_REF] outlines different strategies that can be applied to improve the recognition quality of OCR engines for DSL expressions. In their study, the authors agree that OCR can be coupled with visual semantic analysis to facilitate the interpretation of UML diagrams. Torres et al. [START_REF] Torres | Xamã: Optical character recognition for multi-domain model management[END_REF] offer a uniform approach that is independent of the particularities of template notation, based on OCR techniques. For this purpose, they select graphical models from various domains that typically combine textual and graphical elements. Based on image descriptors and OCR methods, Chen et al. [START_REF] Chen | Automatically recognizing the semantic elements from uml class diagram images[END_REF] propose a system for detecting the various elements within a UML class diagram, while interpreting the content of classes. Finally, several works focus on the hierarchy of structural elements within the class diagram. Babur et al. [START_REF] Babur | Hierarchical clustering of metamodels for comparative analysis and visualization[END_REF] propose representing metamodels in a vector space model, and applying hierarchical clustering techniques to compare and visualize them as a tree structure. Strüber el al. [START_REF] Strüber | Tool support for clustering large meta-models[END_REF] transpose class diagrams into graphical form to group them into clusters of interest, thus facilitating their interpretation. Although these methods have proved effective on UML class diagrams of low complexity, where the structure follows a certain graphical standard and relationships do not cross, they do not generalize to more complex data.

Recently, a few works have used deep learning approaches to analyze class diagrams thanks to their ability to generalize more easily. Bnouni et al. [START_REF] Bnouni Rhim | Cross synergetic mobilenet-vgg16 for uml multiclass diagrams classification[END_REF] combine two types of CNN architectures: Mobilenet and VGG16 and demonstrates that the synergy between them improves the performance of the learning model. Wang et al. [START_REF] Wang | Uml diagram classification model based on convolution neural network[END_REF] propose a method based on a convolutional neural network (CNN), combined with a graph in the attention module to aggregate features, so that the network can capture more important features. The authors justify the poor performance of their system by the lack of training data. To overcome the lack of training data, Gosala et al. [START_REF] Gosala | Automatic classification of uml class diagrams using deep learning technique: convolutional neural network[END_REF] uses transfer learning and artificial data augmentation techniques. Although these recent techniques have been shown to be effective for class diagram classification, it remains to be proven for more complex tasks such as semantic analysis of a diagram. To our knowledge, there is currently no neural network-based method for efficiently performing semantic analysis on a class diagram. This is partly due to the lack of training data and the complexity of the task.

B. Datasets

Several datasets are available for training and evaluating systems to interpret UML diagrams. As observed in Table I, the majority of existing datasets are designed to train learning models to recognize diagram type without focusing on diagram content. Hebig et al. [START_REF] Hebig | The quest for open source projects that use uml: mining github[END_REF] currently offer the largest database with a total of 93,607 UML diagrams. Although the dataset is public, no annotation is provided on the diagrams. Moreover, the dataset corresponds to a compilation of git repositories, where it is necessary to apply scraping and filtering operations in order to retrieve the desired data. According to the various users of this dataset, around 32,000 diagrams correspond to class diagrams, although the exact number is not known because this information is not included in the metadata. It should be noted that since the dataset was published, many repositories are no longer maintained, which means that access to all diagrams is not guaranteed. Ho-Quang et al. [START_REF] Ho-Quang | Automatic classification of uml class diagrams from images[END_REF] and Shcherban et al. [START_REF] Shcherban | Multiclass classification of four types of uml diagrams from images using deep learning[END_REF] both propose different datasets containing UML diagrams, where the aim is to be able to identify the type of diagram from several categories. In addition to providing no further annotation, only a small subset of the data corresponds to UML class diagrams, which is difficult to exploit for training neural networks for semantic analysis. Karasneh et al. [START_REF] Karasneh | Extracting uml models from images[END_REF] use a dataset containing rich annotations on the elements, content and structure of UML class diagrams. However, the dataset is very small, and the data is not made available. Although there are several datasets available for

✗ ✓ ✓ ✗ ✓ Structure ✗ ✗ ✗ ✓ ✗ Elements ✗ ✗ ✗ ✓ ✓ Content ✗ ✗ ✗ ✓ ✗ Availability ✓ ✓ ✓ ✗ ✓
training systems to interpret the content of a UML class diagram, only a small amount of data is actually usable at present for semantic analysis task.

III. FRAMEWORK The NEURAL-UML (iNtelligent rEcognition of strUctuRAl eLements in UML class diagram) framework proposes a strategy for training and evaluating systems for interpreting UML diagrams using deep neural networks. One of the major contributions of this paper is the implementation of a strategy for intelligently collecting and clustering relevant UML diagrams from the various repositories provided in the Lindholmen dataset [START_REF] Hebig | The quest for open source projects that use uml: mining github[END_REF]. Then, the collected data are annotated using a specially developed annotation tool to design a dataset that can be easily exploited by the scientific community. The code implementation for reproducing the dataset and performing a semantic analysis of a class diagram is available online. 1 The metadata from sets A and B in Table II, used to train and evaluate the learning model, are grouped in two respective folders. For set A, the metadata contains the url links for each image, and the coordinates and labels of the various elements contained in the diagrams. For Set B, the metadata is in the same format, with the exception of the url links. In this folder, simply download and move the dataset given by Shcherban et al. [START_REF] Shcherban | Multiclass classification of four types of uml diagrams from images using deep learning[END_REF] into the folder. For both sets, code is provided to load the metadata and display annotations on the images. All the instructions and commands required to run the code and reproduce the experiments are included in the repository.

A. Collecting UML diagrams

To design a comprehensive dataset adapted for semantic analysis, a restructuring of the Lindholmen dataset [START_REF] Hebig | The quest for open source projects that use uml: mining github[END_REF] was proposed. Firstly, a scraping method was applied to the 93,607 web repositories in order to harvest only those files corresponding to UML diagrams. Several links no longer existing, implied a significant reduction of the initial data number. In addition, most of the UML diagrams are not class diagrams. In order to retain only the class diagrams, the pre-trained learning model proposed by Ho-Quang et al. [START_REF] Ho-Quang | Automatic classification of uml class diagrams from images[END_REF] was applied. The result is a subset of 13,800 unannotated class diagrams (Set A). Some elements, such as classes or associations, are represented more than others in class diagrams. Annotating all class diagrams leads to a significant imbalance in annotations. This class imbalance can lead to problems of over-fitting. If the model encounters the same class too often, it will favor that class when learning to maximize its overall performance. However, other poorly represented classes will be neglected and will not be learned or detected by the model. For this reason, only a subset was annotated to overcome this problem. To assess the ability of the proposed approach to generalize well to class diagrams, a second dataset was studied. The second dataset corresponds to the subset of 700 class diagrams proposed by Ho-Quang et al. [START_REF] Ho-Quang | Automatic classification of uml class diagrams from images[END_REF], on which a manual annotation has been performed (set B). This choice is related to the fact that this dataset is easily accessible and the quality of provided data is good. 1 Code repository: https://gitlab.univ-lille.fr/emmanuel.renaux/neural-uml The dataset used in the proposed framework accounts for a total of 14,500 class diagrams. Of these, seven elements are annotated: classes, association, inheritance, aggregation, composition, dependency and realization. The number of annotations obtained for sets A and B is given in Table II. Set A contains 13,800 class diagrams out of the 32,000 existing diagrams in the Lindholmen dataset [START_REF] Hebig | The quest for open source projects that use uml: mining github[END_REF], after filtering out corrupted url links and unusable diagrams. Only 1,318 were annotated to obtain the annotations presented in Table 2. Indeed, as the annotation task is relatively long (between 10 to 60 seconds depending on the complexity of the diagram), and the number of annotated data sufficiently exhaustive and balanced, annotating all the diagrams doesn't seem essential. However, further enrichment of the dataset with other interesting annotations, such as notes or interfaces, is not excluded in the future. More complex annotations, such as structural relationships between classes, or textual content, can also enrich existing metadata. Set B contains 700 class diagrams, corresponding to all the data contained in the dataset provided by Shcherban et al. [START_REF] Shcherban | Multiclass classification of four types of uml diagrams from images using deep learning[END_REF]. All annotations were made by hand, by three annotators. Despite having only one annotator per diagram to guarantee a large number of annotations, a visual check was carried out by at least one other annotator.

B. Annotation tool

To annotate the data, a tool was designed specifically for this purpose. The tool enables all class diagrams to be browsed and visualized in image format, as illustrated in Fig. 2. The tool consists of two parts: a viewer and a manager. In order to guarantee the accuracy of annotations and adapt to the highly variable size of diagrams, the viewer allows users to scroll through the image using directional arrows. For each image, the annotator can annotate the elements contained in the diagram, from among the various possible relationships. Right-click to assign a relationship to the cursor position in the image. Left-click to delimit the class bounding box. Once an image has been annotated, it is possible to move on to other images, or go back to check or modify annotations. The tool saves each modification in real time, enabling the annotation process to be resumed at any time. As for annotations, every coordinate is saved, along with the associated label in csv format for easy data import and export. The tool is multiplatform: Windows, Unix and Mac.

C. Learning data processing

Several strategies are used to make it easier to learn the model, and thus improving the accuracy of classification and localization of elements within a class diagram. Learning-based approaches, such as neural networks, generally require the images used as model inputs to be of the same dimension, to guarantee consistency in the dimension of the feature vectors. In this case, a normalization step is applied to resize the images. In some works, as proposed by Gosala et al. [START_REF] Gosala | Automatic classification of uml class diagrams using deep learning technique: convolutional neural network[END_REF], the image sizing parameter plays a significant role in model performance. This step is empirical and computationally time-consuming. In addition, image resizing has consequences for data quality, where a compression effect tends to degrade important information such as text, or small details. In the proposed framework, YOLOv8 [START_REF] Jocher | Ultralytics yolov8[END_REF] is used for its ability to adapt to image size, but also for its accuracy and speed of execution. YOLOv8 learning architecture overcomes the normalization step by including multi-scale detection in the convolution layers. The architecture is well suited to the analysis of UML class diagrams, as the dimensions of classes and relationships vary greatly from one modeling tool to another. To perform this detection, YOLO uses three different scales to adapt to different object sizes, using 32, 16 and 8 divisors. Thus, for a 416 x 416 image, YOLO performs a first detection on a 13 x 13 image, a second detection on a 26 x 26 image and a third detection on a 52 x 52 image, as illustrated in Fig. 3.

b) Dealing with unbalanced data: As mentioned in Section III-A, the elements contained in the UML diagrams of set A used to train the model, are not all annotated in order to avoid a major imbalance in the categories. It is therefore not possible to send complete images to YOLO, where some elements are not annotated. This would prevent the learning model from converging. Indeed, in the case where some diagrams are partially annotated while others are fully annotated, an element is considered to belong to class A on one diagram and to class B on another. In this context, the model is unable to interpret the exact class of this element if it is classified differently from one image to another. This is equivalent to an element being incorrectly annotated. To overcome this problem, each class diagram is split into a subset of patches located on each annotated element. For example, if the diagram contains two classes and a navigable relationship between these classes, then three patches are created: two patches corresponding to the classes and one patch corresponding to the navigable relationship. To create these patches, an enclosing window is created around the annotated element.

c) Avoid handling non-essential data: Information contained in diagrams, such as text, manual annotations or elements that are not considered to be learnable, can be considered as a reject class for the learning model. In this study, metadata do not contain elements such as interfaces or notes. Consequently, when the model is trained, these elements are considered as belonging to the "background" class, which contains all the elements to be excluded during the inference stage. The same applies to text outside classes. On the other hand, text within a class can have an impact on the recognition rate of a class. This is because, during learning, the model focuses on the overall structure of a class, and often on the structuring elements (i.e., border, corner, number of vertical and horizontal strokes). If the name of a class always has a particular feature, e.g., being bold or capitalized, the model will interpret this information as important in its decision-making. On the other hand, if the structure of the classes is similar from one diagram to another, but the textual content always varies, then the model will consider that this information is not redundant, and therefore not essential. This is why, if you want to deal with information other than element structure, it's essential to take this need into account when designing the apprentice model. In the current study, the YOLO architecture is not suited to interpreting textual content, and tends to ignore it in the learning phase.

D. Implementation details

The architecture of object detectors is divided into three parts: the backbone, the neck and the head, as illustrated in Fig. 4. The backbone is crucial for extracting valuable features from input images, typically using a convolutional neural network (CNN) trained on large-scale image classification tasks. In this study, the architecture is pre-trained on COCO [START_REF] Lin | Microsoft COCO: common objects in context[END_REF]. The backbone captures hierarchical features at different scales. Lower-level features (such as edges and textures) are extracted in previous layers, and higher-level features (such as object parts and semantic information) are removed in deeper layers. The neck is an intermediate component that connects the spine to the head. The YOLO model works through these different steps: Bounding box regression: The next step is to determine the bounding boxes which correspond to rectangles highlighting all the objects in the image. We can have as many bounding boxes as there are objects within a given image. YOLO determines the attributes of these bounding boxes using a single regression module in the following format, where Y is the final vector representation for each bounding box. Y = [pc, bx, by, bh, bw, c1, c2, ..., c7] where pc corresponds to the probability score of the grid containing an object. bx, by are the x and y coordinates of the center of the bounding box with respect to the enveloping grid cell. bh, bw correspond to the height and the width of the bounding box with respect to the enveloping grid cell. c1, c2, ..., c7 correspond to the seven element classes selected in this study.

Metrics: Most of the time, a single object in an image can have multiple grid box candidates for prediction, even though not all of them are relevant. The goal of the IOU (a value between 0 and 1) is to discard such grid boxes to only keep those that are relevant. YOLO computes the IOU of each grid cell which is the Intersection area divided by the Union Area. Finally, it only takes into account predictions whose IOU is greater than a fixed threshold.

In this article, the latest version of YOLO is used. As a state-of-the-art model, YOLOv8 builds on the success of previous versions, introducing new features and enhancements to increase performance, flexibility and efficiency. YOLOv8 supports a full range of visionary AI tasks, including detection, segmentation, pose estimation, tracking and classification. YOLO is based on the idea of segmenting an image into smaller images. The image is split into a square grid of dimensions S × S. The cell in which the center of an object resides, is the cell responsible for detecting that object. Each cell will predict B bounding boxes and a confidence score for each box. The default for this architecture is for the model to predict two bounding boxes. The classification score will be from 0.0 to 1.0, with 0.0 being the lowest confidence level and 1.0 being the highest; if no object exists in that cell, the confidence scores should be 0.0, and if the model is completely certain of its prediction, the score should be 1.0. These confidence levels capture the model's certainty that there exists an object in that cell and that the bounding box is accurate. Each of these bounding boxes is made up of 5 numbers: the x position, the y position, the width, the height, and the confidence. The coordinates (x, y) represent the location of the center of the predicted bounding box, and the width and height are fractions relative to the entire image size. The confidence represents the IOU between the predicted bounding box and the actual bounding box, referred to as the ground truth box. The IOU stands for Intersection Over Union and is the area of the intersection of the predicted and ground truth boxes divided by the area of the union of the same predicted and ground truth boxes. In addition to outputting bounding boxes and confidence scores, each cell predicts the class of the object. This class prediction is represented by a one-hot vector length C, the number of classes in the dataset. Thus, each prediction from a grid cell will be of shape C + B x 5, where C is the number of classes and B is the number of predicted bounding boxes. B is multiplied by 5 because it includes (x, y, w, h, confidence) for each box. Because there are S × S grid cells in each image, the overall prediction of the model is a tensor of shape S × S × (C + B x 5).

Compared with older versions of YOLO, YOLOv8 is an anchor-free model. This means it directly predicts the centre of an object instead of the offset from a known anchor box. Anchor boxes are a predefined set of boxes with specific heights and widths, used to detect classes of objects with the desired scale and aspect ratio. They are chosen according to the size of the objects in the training dataset and are arranged in a mosaic over the image during detection. The network generates probabilities and attributes such as background, aperture angle and offsets for each tiled box, which are used to adjust the anchor boxes. Multiple anchor boxes can be defined for different object sizes, serving as fixed starting points for estimating bounding boxes. The anchor-free analysis of YOLOv8 tends to directly predict the centre of an object instead of the offset from a known anchor box. The advantage of anchor-free detection is that it is more flexible and efficient, as it does not require the manual specification of anchor boxes, which can be difficult to choose and can lead to suboptimal results in previous YOLO models such as v1 and v2.

Another interesting feature for our case study has been introduced since version 7 of the model. YOLOv7 also introduces a new multi-scale training strategy, which involves training the model on images at several scales and then combining the predictions. In addition, YOLOv7 incorporates a new technique called 'Focal Loss', designed to address the problem of class imbalance that often arises in object detection tasks. Focal Loss gives greater weight to data that is more complex to encode for the model, and reduces the influence of data that is less complex to interpret or more redundant. This involves influencing the learning of the model by forcing it to focus on certain details at the expense of others. This technique helps the model to converge when there is a strong imbalance of classes, or when learning is conditioned by expert knowledge.

IV. EXPERIMENTATION

In this section, we present an evaluation for the semantic analysis of a class diagram using the proposed NEURAL-UML framework. Using the set A and B as input to a neural network, we perform an evaluation of the model predict element types for seven cases, including the classes and the six relationship types: Association, Inheritance, Aggregation, Composition, Dependency and Realization. That is, for a given class diagram, the aim is to classify and locate all the structuring elements contained in the image.

A. Evaluation protocol

In order to evaluate the decision making model, a k-fold cross validation is used, with k = 5. This protocol aims to check the good performance of the model when faced with unknown data. The performance of the model is measured by the mean accuracy over all k-folds, as well as the standard deviation. As shown in Fig. 5, in this scenario the method consist to divide the dataset into five folds. The model uses the first fold in the first iteration to test the model (test). It uses the other datasets to train the model. The second fold helps to test the dataset (validation) and the others support the training process (train). The same process is repeated until the test set uses each of the five folds. In this study, an extension of classical k-fold cross-validation is applied. Instead of the divisions being completely random, we apply stratified crossvalidation, which consists of ensuring that the ratio between the target classes is the same in each fold as in the entire data set.

To learn the model, cross-validation is applied only to the set A. Set B is used only to assess the capacity of the model to generalise to unknown data, with different formats to the data used for training. In this scenario, all the data is grouped together in a unique test fold. Only the inference of the model is evaluated, and no training is carried out on these data.

B. Performances metrics

To determine and compare the predictive performance of the proposed model, three most common evaluation metrics are used: Intersection over Union (IoU), F1 score, and k-fold cross-validation accuracy metrics.

a) Intersection over Union (IoU): The union intersection is a popular metric for measuring the localization accuracy and calculating the localization errors in object detection models. To calculate the intersection between the predicted bounding boxes and the ground truth bounding boxes, the area of intersection between the two corresponding bounding boxes for the same object must be calculated. Next, the total area covered by the two bounding boxes, also known as the "Union", and the area of overlap between them, known as the "Intersection", is calculated. The intersection divided by the union gives the ratio of the overlap to the total area, which provides a good estimate of how close the prediction bounding box is to the original bounding box. The IoU threshold α decide whether the prediction is True Positive (TP), False Positive (FP), or False Negative (FN). The Fig. 6 illustrate predictions with the b) F1 score: F1 score is an evaluation metric that assesses the predictive skill of a model by elaborating on its class-wise performance rather than an overall performance as done by accuracy. F1 score combines two competing metricsprecision and recall scores of a model. F1 score can be interpreted as a harmonic mean of the precision and recall, where an F1 score reaches its best value at 1 and worst score at 0. It is calculated from a confusion matrix. A confusion matrix represents the predictive performance of a model on a data set.

Based on the True Positive (TP), False Positive (FP), and False Negative (FN), for each labeled class, two parameters: precision and recall are calculated.

Recall gives the percentage of positives correctly predicted by the model. In other words, it is the number of well-predicted positives (True Positives) divided by the total number of positives (True Positives + False Negatives). Its mathematical form is as follows:

Recall = T P T P + F N . (1)
The higher it is, the more the model maximises the number of True Positives. However, this does not mean that the model does not make mistakes. When the recall is high, it means that it will not miss any positives. However, this does not give any information about its predictive quality on negatives.

Precision is a measure of the number of positive predictions made. It is the number of correctly predicted positives (True Positives) divided by the total number of predicted positives (True Positives + False Positives). In mathematical form, this gives :

P recision = T P T P + F P (2)
The higher it is, the more the model minimises the number of False Positives. When the accuracy is high, this means that the majority of the positive predictions made by the model are well-predicted positives.

Although they are useful, neither precision nor recall can fully evaluate the model. Taken separately, these two metrics are useless. If the model predicts 'positive' all the time, recall will be high. On the other hand, if the model never predicts "positive", precision will be high. The F1 Score provides a good assessment of the performance of the model. It is calculated as follows:

M SE = (1/n) * (y i -f (x i )) 2 (4)
where n is the total number of observations, y i correspond to the response value of the i th observation and f(x i ) is the predicted response value of the i th observation. The closer the model predictions are to the observations, the smaller the MSE will be. Typically, the test is performed on a subset of the dataset. It gives an idea of a model's performance on data it has never seen before. However, the disadvantage of using only one test set is that the MSE can vary considerably depending on the observations used in the training and test sets. One way to avoid this problem is to fit a model several times using a different training and testing set each time, then calculating the test MSE to be the average of all of the test MSE's. This general method is known as cross-validation and a specific form of it is known as k-fold cross-validation, as illustrated in Fig. 5. The dataset is randomly divided into k groups, or "folds", of roughly equal size. One of the groups is used as a test set and the others as a training set. The MSE is then calculated from these two subsets of data. The process is repeated k times, each time using a different set as the test set. The overall test accuracy being the average of the k test MSEs and is calculated as follows:

M SE = (1/k) * M SE i (5)
where k in the number of folds and M SE i is the test MSE on the i th iteration. The standard deviation calculated from the k-fold accuracies obtained ensures that the model generalizes well when trained on different folds.

C. Quantitative results

Applying the proposed learning model to the set A, using stratified k-fold cross-validation (k=5), we obtained an average accuracy of 92.59% over seven categories. Considering the performance given in the confusion matrix Fig. 7, the model performs well on all categories. Among the errors observed, the categories corresponding to the {Inheritance-Realization} relationships are the least well classified. The model sometimes tends to confuse classes with relationships. This can be explained by the fact that the annotations often overlap, given their close proximity in the class diagram.

As for the evaluation on the set B, by only performing inference with the model trained exclusively on set A, the results observed are very positive, with an average accuracy of 94.11%. The confusion matrix in Fig. 8 shows that the model generalises perfectly from one set to another. It is important to note that there is less confusion between classes and relationships. The majority of errors observed concern the {Inheritance-Realization} and {Navigable-Dependency} relationships. This can be explained by their close similarity in their graphical representation in the class diagram.

The results observed on both datasets A and B are very positive and highlight the ability of the proposed model to correctly classify the seven structural elements included in a class diagram. In addition, the two annotated datasets respond perfectly to the need to develop new models to facilitate the emergence of automatic classification and interpretation of class diagrams.

D. Qualitative results

In addition to the quantitative study, a qualitative study was carried out to examine the capacity of the model to localise predictions. Two metrics were used: the IoU and the F1 score. For set A, the calculated IoU is 85%. The F1 score is calculated according to the distance between the centroid of the region corresponding to the ground truth and the centroid of the predicted region. The distance between centroids corresponds to the tolerance threshold that defines whether a prediction is considered a true positive or a false positive. This distance is estimated in pixels. As shown in Fig. 9, the model quickly achieves good accuracy with a relatively small deviation of just 2 pixels from the ground truth. The Aggregation and Composition relationships are easier for the model to locate. This is due to their easily identifiable symbol in the class diagram. On the other hand, the Navigable relationship remains the most complex to localize. The model tends to localize this relationship to within 8 pixels of its exact position. Compared with the other relationships, this can be explained by the highly variable graphical style of the Navigable relationship in the various class diagrams analysed.

The same qualitative study was carried out on set B. The IoU calculated was 87.95%. Fig. 10 shows the F1 score according to the distance between the predicted centroids and the ground truth centroids. Although the model is more accurate, the results follow the same trend as in the previous study. The performance for the navigable relationship is better on this dataset. This may be due to the fact that the graphical style of the class diagrams is more standardised, which reduces the appearance of complex formats.

V. DISCUSSION AND CONCLUSION UML notation is used throughout the software development process as a common representation. Thanks to this lingua franca, it is possible to hold a design meeting, build a shared model of the problem and propose a design plan. However, as the UML tools are perceived as heavy to use and the UML language difficult to learn, designers prefer to write the UML manually using a pencil and a sheet of paper or a whiteboard and in an informal manner. In practice, UML diagrams are often simply photographed and stored as images, which limits their use and evolution.

In this article, we presented an experiment using the advances in the field of deep learning to recognise UML class diagrams. We propose a framework for training a learning model to categorise and locate semantic elements in class diagram from an image. The performance (Set A-IoU: 85%,ACC: 92.59% ; Set B-IoU: 87.95%, ACC: 94.11%) obtained by the proposed model highlights the capacity of the model to generalise to a large dataset.

One of the main contributions of this paper is the implementation of a sourcing strategy to gather and group relevant UML diagrams from the different repositories available on the web. The other contribution is the annotation tool that allows to annotate the collected data. This tool has been specially developed for creating a dataset and can be easily exploited by the scientific community. Finally, the aim of the paper is to allow reproduction of the data set and to carry out a semantic analysis of a class diagram.

In view of the performance achieved by the proposed approach, we can expect UML practice to evolve towards a more flexible software design method. There is still work to be done to improve the accuracy of recognising diagrams from modelling tools and then to tackle freehand diagrams. The next step is to use this semantic extraction to think about usage in software design. In particular, precision can be improved by cross-referencing with the theme of the project, its lexical field and the overall context of the IT project (Jira, Kanban board...). And if we go even further, we can imagine a recommendation engine that helps the designer to draw up a model of a software using augmented reality, without being a UML expert and using a simple whiteboard.

Fig. 1 .

 1 Fig. 1. Overview of the proposed framework. A) A web scraping step is used to retrieve UML class diagrams from a large number of Git repositories [1]. B) Each class diagram is annotated using an annotation tool developed for this study. C) A neural network is trained on the annotated data to identify the various components that make up a UML class diagram passed in parameter. D) All the classes and relationships are categorised and located on the diagram.

Fig. 2 .

 2 Fig. 2. Annotation tool for class diagrams in two parts. Left, the viewer for browsing the image and viewing annotations. Right, the manager for selecting the type of relationship to assign to the mouse click, and for swapping images.

Fig. 3 .

 3 Fig. 3. How YOLO works to analyse images on several levels of scale, and thus identify objects of varying size in the images.

Fig. 4 .

 4 Fig. 4. Overview of the learning method. A) The class diagrams of set A are divided into small patches to obtain clusters of images for each type of structural element. B) The data is injected into a YOLOv8 architecture in order to train the model to recognise these elements in a class diagram. C) Once trained, the learning model takes as input a class diagram of any dimension and predicts both the category of the elements and their localization.

Fig. 5 .

 5 Fig. 5. K-fold Cross-validation, with k = 5. Set A is divided into three parts: Train, Validation and Test at each iteration. Only set A is used to train the model. Set B is used only to test the model inference, in a single iteration.

Fig. 6 .

 6 Fig. 6. An example of computing Intersection over Unions for various bounding boxes on a UML class diagram, where α threshold is set at 0.5.

F 1 = 2 *

 12 P recision * Recall P recision + Recall = 2 * T P 2 * T P + F P + F N (3) c) K-fold cross validation accuracy: The most common way to measure the predictions made by the model match the observed data is by using the mean squared error (MSE), which is calculated as:

Fig. 7 .

 7 Fig. 7. Confusion matrix on the set A consisting of 10,625 annotations divided into 7 categories. The results correspond to the average precision obtained in each fold, as well as the standard deviation for each category.

Fig. 8 .

 8 Fig. 8. Confusion matrix on the set B consisting of 11,997 annotations divided into 7 categories. The results correspond to the precision obtained on all the data for each category.

Fig. 9 .

 9 Fig. 9. Localization accuracy of structural elements in set A as a function of the distance tolerance between predicted and real Localization.

Fig. 10 .

 10 Fig. 10. Localization accuracy of structural elements in set B as a function of the distance tolerance between predicted and real Localization.

TABLE II NUMBER

 II OF MANUAL ANNOTATIONS PERFORMED ON THE TWO CLASS DIAGRAM DATA SUBSETS.

		Class	Asso.	Inher.	Aggre.	Compos.	Depend.	Realiz.
	Set A	1,776	1,777	1,230	1,608	1,433	1,629	1,172
	Set B	5,968	1,551	2,839	552	523	353	211
	Total	7,744	3,328	4,069	2,160	1,956	1,982	1,383