scieee AI-readable full text Open interactive document viewer

Validity of Machine Learning in Assessing Large Texts Through Sustainability Indicators

García-Esparza, Juan A.; Pardo, Javier; Altaba, Pablo; Alberich, Mario

Abstract

As machine learning becomes more widely used in policy and environmental impact settings, concerns about accuracy and fairness arise. These concerns have piqued the interest of researchers, who have advanced new approaches and theoretical insights to enhance data gathering, treatment and models’ training. Nonetheless, few works have looked at the trade-offs between appropriateness and accuracy in indicator evaluation to comprehend how these constraints and approaches may better redound into policymaking and have a more significant impact across culture and sustainability matters for urban governance. This empirical study fulfils this void by researching indicators’ accuracy and utilizing algorithmic models to test the benefits of large text-based analysis. Here we describe applied work in which we find affinity and occurrence in indicators trade-offs that result be significant in practice to evaluate large texts. In the study, objectivity and fairness are kept substantially without sacrificing accuracy, explicitly focusing on improving the processing of indicators to be truthfully assessed. This observation is robust when cross-referring indicators and unique words. The empirical results advance a novel form of large text analysis through machine intelligence and refute a widely held belief that artificial intelligence text processing necessitates either accepting a significant reduction in accuracy or fairness.

Full text

ORIGINAL RESEARCH Accepted: 18 January 2023 © The Author(s) 2023 Juan A. García-Esparza [email protected] Javier Pardo javier[email protected] Pablo Altaba [email protected] Mario Alberich [email protected] 1 School of Technology and Experimental Sciences, Universitat Jaume I, Avda. Vicent Sos Baynat s/n, 12006 Castellón de la Plana, Spain 2 Department of Business, Universitat Autònoma de Barcelona, Barcelona, Spain 3 Department of Statistics, Universitat de Barcelona, Barcelona, Spain Validity of Machine Learning in Assessing Large Texts Through Sustainability Indicators Juan A.García-Esparza1· JavierPardo2· PabloAltaba1· MarioAlberich3 Social Indicators Research https://doi.org/10.1007/s11205-023-03075-z Abstract As machine learning becomes more widely used in policy and environmental impact settings, concerns about accuracy and fairness arise. These concerns have piqued the interest of researchers, who have advanced new approaches and theoretical insights to enhance data gathering, treatment and models’ training. Nonetheless, few works have looked at the trade-offs between appropriateness and accuracy in indicator evaluation to comprehend how these constraints and approaches may better redound into policymaking and have a more significant impact across culture and sustainability matters for urban governance. This empirical study fulfils this void by researching indicators’ accuracy and utilizing algorithmic models to test the benefits of large text-based analysis. Here we describe applied work in which we find affinity and occurrence in indicators trade-offs that result be significant in practice to evaluate large texts. In the study, objectivity and fairness are kept substantially without sacrificing accuracy, explicitly focusing on improving the processing of indicators to be truthfully assessed. This observation is robust when cross-referring indicators and unique words. The empirical results advance a novel form of large text analysis through machine intelligence and refute a widely held belief that artificial intelligence text processing necessitates either accepting a significant reduction in accuracy or fairness. Keywords Indicators Optimization · Machine Learning · Software Development · Natural Language Processing 1 3 J. A. García-Esparza et al. 1 Introducción Over the past decades, the development of indicators has greatly matured with several theoretical and empirical scholarly works focused on sustainable urban development (Bienvenido-Huertas et al., 2020; Kubiszewski et al., 2022; Ruan & Yan, 2022; Verma & Raghubanshi, 2018). Research through indicators has informed an integral part of urban governance and sustainability by signalling the relevant aspects of a society or a place (Elgert, 2016; Sharifi, 2020). The number of existing indicators for analysis is constantly increasing (La Rosa et al., 2016; Jain & Tiwari, 2017; Mapar et al., 2017; Borsekova et al., 2018; Dawodu et al., 2018; Hatakeyama, 2018; Ameen & Mourshed, 2019; Frare et al., 2020; among others). Indicators, particularly in urban studies, help to systematize and categorize data (Akuraju et al., 2020). Nonetheless, any set of indicators may seem rigid and unable to reflect on specific complexities (Holden, 2013). However, the importance of measuring sustainable aspects through indicators lies in providing an accurate and summarised analysis of factors when dealing with textual data (De Sherbinin et al., 2013). An underpinning principle for urban sustainability is to place society at the core of valuation processes. Culture valuing and enhancement is a social product that comes with development processes (Bandarin, 2019; ICCROM, 2015; García-Esparza & Altaba, 2022; Jones & Leech. 2015;). The New Urban Agenda (NUA) (United Nations, 2017; UNESCO, 2017) established the reasons for a new urban culture approach in which conceptual transitions are still underway. Cultural ecosystems are perceived as a system of values intrinsically linked to the social, environmental, and economic dimensions of sustainability. The implications of this are not yet fully analysed and will mark the nature of the cultural realm in the twentyfirst century (García-Esparza, 2022). Labadi & Logan (2016) already exposed the need for culture to reduce poverty, mitigate social inequalities, and increase security and health. ICOMOS (2017, 2019) endorsed this approach with an Action Plan for cultural heritage and the UN Sustainable Development Goals (SDGs) and a later Concept Note as policy guidance for implementing the Action Plan. The Plan and Note explicitly recommended linking culture and sustainable local socio-economic development by ensuring that all four spheres contribute to sustainable development. This framework outlines how critical it is to put culture and individuals in the best context to leverage policies and interventions and how necessary it is to analyze this minimizing potential biases. Artificial intelligence (AI) has proved to be helpful in a holistic set of tasks related to text mining. Digital processing may serve to comprehend the importance of indicators’ composition and versatility, for example, in examining their practical impact according to the polyvalent terms they contain (Sciandra et al., 2021). Through AI, indicators would reflect greater leverage policies and principles that address pressing societal challenges where social and cultural determinants (defined as the preconditions of places and people) account for disadvantages and inequality (Guitton, 2020; Chen et al., 2018; Ramos et al., 2018). Through Machine Learning (ML), the analysis of multiple parametres such as basic needs, access to essential services, accesibility, housing adequacy, environmental pollution, access to green areas, or well-being, are correlated to present directions for future work to leverage synergies in machine learning and text analysis(Mhasawade et al., 2021; Yeung & Fernandes, 2022). 1 3 Validity of Machine Learning in Assessing Large Texts Through… To better understand the elements impacting society’s functioning, empirical and traditional statistical methods such as principal component analysis (PCA), clustering methods, regression, and other linear approaches have been employed previously (Rivera, 2014). ML has successfully overcome the limitations of statistical approaches. These advanced analytics are known to yield greater or at least equal accuracy results compared to previous approaches (Lima et al., 2015; Shortridge et al., 2016). Besides, ML techniques have several advantages that include the capacity to deal with data of various types, structures, and quantities (i.e., big data) (Molnar, 2019; Ren et al., 2020; Viana et al., 2021). ML models have been successfully applied to date in many science studies (Rivera et al., 2014; Schober et al., 2018). However, in this study, rather than doing a “bag of words” (TF-IDF) search (Park & Okudan Kremer, 2017), what the model does is to encode words in vectors to evaluate indicators’ distance in terms of affinity and occurrence. In this way, the study explores the use of an ML model coupled with a test of different algorithms to increase understanding of how indicators’ composition and preconditions can deal better with analytical challenges and thus provide novel insights into artificial text assessment. Current challenges require considering indicators as a network formed by linked categories that interact and merge spatiality (Egilmez et al., 2015; Phillis et al., 2017; Zinatizadeh et al., 2017). Understanding indicators’ connections and their application to texts facilitate methodological AI developments (Spadon et al., 2019). In this regard, indicators help problem selection and formulation for judging processes and outputs (Akhanova et al., 2020; Dornelles et al., 2020). Context-appropriate indicators are useful at many scales; however, they require prior work on limitations in data collection, adaptability to problem selection and formulation (Valencia et al., 2019). To do so, Machine Intelligence evaluates data and helps researchers understand how, after sorting indicators by range and affinity, with particular attention to the cultural realm of indicators, words’ occurrence explains affinity and indicators’ effectiveness in the analysis of large texts. The research objectives are twofold. On the one hand, this study aims to understand the relevance of indicators and unique words through textual analysis. This objective pretends to ease measurement and incorporate complex social determinants in AI models. On the other hand, another objective is to build up reliable algorithmic assessments to trace indicators’ composition and interrelation patterns to better assess and predict texts’ compositions. These objectives may go beyond to what a specific field of enquiry comprehends, and invades alien areas of knowledge, looking for more plural, multidisciplinary and integrated forms of analysis that help scientists programme and apply machine learning processes. Researchers have gathered 1082 indicators from previous scholarly works. Indicators are divided into 798 general indicators (Annex A, spreadsheet 1) that cover the environmental, social, and economic spheres of sustainability and 284 cultural indicators (Annex A, spreadsheet 2) that cover the fourth dimension. Behind the subdivision, researchers intend to cross-refer them to comprehend how the model works towards affinity and occurrence. To what extent can we trust these general and cultural indicators to rely on each other and summarise and understand content-related texts? Are cultural indicators more specific than their general counterparts? If so, to what extent are they? Through a machine intelligence assessment of indicators, researchers will answer these questions and apply the results to the analysis of the Agenda 2030. The research process will be split into four phases, documented and explained in detail in the Methodology, Results section and Annexes A to D. The Method section outlines the entire process to convey 1 3 J. A. García-Esparza et al. the project’s structure efficiently. Afterwards, the Results section documents the different phases according to the outputs of the previous one. 2 Methodology 2.1 Data Collection Indicators’ Obtention and Classification Researchers elaborated the list of indicators using the Web of Science (WoS)search engines. As a result, journals were selected within the first quartile of the Regional and Urban Planning and Urban Studies categories. In addition, the journals Ecological Indicators and Sustainable Cities and Society, not classified within those categories, were also considered for their connection with the scope of this study. The search for indicators in WoS database journals followed these criteria: the title must include the word “indicator”, keywords as part of the topic must be “urban” or “city-cities”, while the publishing period was limited to the period 2015–2020. From 100 papers, we selected four articles from the Regional and Urban Planning category, eight articles from Urban Studies, and 18 articles from the two journals belonging to Environmental science and Green and sustainable science and technology categories (Table 1, Annex A). The articles Rank Journal Articles Selected articles Regional and Urban Planning Technological Forecasting and Social Change 0 0 Landscape and Urban Planning 5 1 Journal of the American Planning Association 0 0 Computers Environment and Urban Systems 7 1 Sustainable Development 2 2 Journal of Rural Studies 0 0 Regional Studies 0 0 TOTAL 14 4 Urban Studies Cities 8 4 Habitat International 7 3 Urban Forestry & Urban Greening 4 1 Journal of Urban Technology 2 0 Environment and Urbanization 3 0 Journal of Planning Education and Research 1 0 Urban Geography 0 0 International Journal of Urban and Regional Research 0 0 TOTAL 25 8 Others Ecological Indicators 47 11 Sustainable Cities and Society 14 7 TOTAL 61 18 TOTAL ARTICLES 100 30 Table 1 Selected journals and articles for the general indicators 1 3 Validity of Machine Learning in Assessing Large Texts Through… provided a total of 855 indicators, and we classified them into dimensions and categories according to their nature (Andries et al., 2019; Huovila et al., 2019; Sowińska-Świerkosz, 2017). Researchers discarded some indicators as they were outside the scope of the study. The final amount reached 798 evaluable indicators. The search of cultural indicators was carried out using the WoS search engines as well and based on the following criteria: the title must include the word “cultural indicator”, keywords as part of the topic must be, “framework”, while the publishing period was limited to the period 2015–2020. As a result, we obtained 27 articles. Of these articles, a total of 359 indicators were categorised, but 75 were discarded due to repetition or because they were outside the scope of the article, resulting in 284 indicators. Fig. 2 Image of the Indicators Match Visualizer, website version Fig. 1 Two components PCA. Visualisation for indicator type. General indicators (blue), Cultural indicators (red) 1 3 J. A. García-Esparza et al. 2.2 Training Set and Data Processing 2.2.1 Indicators Cleaning After indicators’ collection and classification, the heterogeneous lexical composition in some cases, the inclusion of non-alphanumeric characters in others, the specificity of others containing dates, and the eventual inclusion of non-English terms or unknown encoding symbols make indicators not purely objective. Therefore, if not appropriately cleaned the model application to analyse appropriateness and relevance would have led to errors and misunderstandings. The cleaning process consists of three steps. First, remove wrong characters such as commas, semicolons, dots, quotation marks, etc. Second, to translate non-English words and indicators. And third, to discard duplicates of both types of indicators. Researchers use RegEx, a popular tool that allows modifying (including replacing and removing) characters through standard encoding Python methods to work with Latin encoding (ISO-8859-1). 2.2.2 Model Selection, Fine Tuning and Indicators Matching The objective of this stage of the research is to select an appropriate algorithmic model to perform text similarity. This research means to filter and cross-refer sustainability and culture-related topics, fine-tune them to have the most accurate result, and then to match indicators and large texts. When working with Natural Language Processing and text simi- Table 3 Full and batch test of Housing, Marginalized Communities & Inequality text top_match_0 top_match_1 top_match_2 similarity_0 similarity_1 similarity_2 Full Housing quality (area per capita), informal housing and slum reduction Using smart solutions to enhance accessibility to services and amenities Quick response system to municipal Health, safety and enivironmental problems 0.630492 0.577984 0.513161 Batch Affordable housing Accessibility for disadvantaged Adaptation for social inclusion 1.64125 1.5291 1.24735 indicator closest_indicator similarity 1 Access to public transport Access to public transportation 0.998026 3 Renewable Energy Production Renewable energy 0.981198 5 Google hits for the string city name & climate change & flood (hits per million inhabitants) Google hits for the string city name & climate change & sea level rise (hits per million inhabitants) 0.977662 7 Water consumption Water use 0.96699 9 Proportion of singleparent families; Proportion of households that are lone-parent households 0.962271 Table 2 Selection of best matches 1 3 Validity of Machine Learning in Assessing Large Texts Through… larity, algorithms count the words present in a sentence and check if they are present in other sentences under comparison, so the more words exist in both texts, the more similar they will be. The most well-known method for doing so is the TF-IDF Vectorizer. The researchers apply a pre-trained transformer (word embeddings) from HuggingFace called all-roberta-large-v1. With the algorithmic approach, the researchers want to retrieve an interpretation of relationships based on an average of biases. Using the algorithm, the linkage between general and cultural indicators and vice versa is analysed employing similarity indices to their counterparts. The relevant question the researchers want to solve is whether the model is consistent in terms of affinity between indicators and their keywords, and at a final instance, with more extensive texts. The assessment of the model includes the following steps (Annex B): ●Model Exploration: selection of an appropriate algorithmic model, – Analysis of Components PCA Visualisation for clusters of indicators, ●Validation: clustering method to represent indicators, – KMeans Optimization (algorithm) to obtain the best number of clusters, – Elbow Method to justify the differences between clusters, – Chi-Square contingency: checks the hypothesis behind clustering, ●Fine-Tuning (optimization): of components’ number for the encoding matrix, – Analysis of variance according to the Nº of components, ●Error Analysis: of indicators matching through cosine similarity, – Lexical variations, long sentences limitation and synonym recognition, ●Indicators Matching: test of best and worst matches to evaluate the model, – Soft Voting Classifier for the model. 2.2.3 Model Application Word Embedding Limitations Once the model is fine-tuned and ready to work, the authors realise that the transformer’s performance (word embeddings like Roberta) decreases when lengthier texts pass through it. To avoid this bias, researchers shortcut extensive sentences by reducing the number of words by removing stop-words and not applying the model once but applying it for every sub-sentence defined by all words between dots and commas characters. In this way, researchers reduce the vagueness of the model. The process is most code-intensive but simplistic in procedural terms. The stages are as follows: To remove stop-words, to apply the 1 3 J. A. García-Esparza et al. model to a vector of sentences (Hadamard Product), and finally, to create a Soft Voting Classifier for the model. 3 Results 3.1 General and Cultural Indicators Matching One of the initial objectives of the project is to match general with cultural indicators. The model of indicators matching exports two CSV files. One contains the indicator we want to match and the top 5 similar indicators from the other type (indicator_matches.csv). The other file contains the encoded matrix of the clean indicators to be used directly in the next phase of the project, where the model and the PCA will be initialized again then (See Annex C). 3.2 Indicators Match Visualizer¶ The Software exposes graphically and interactively the 3D visualization of indicators matching (Fig. 11). With the visualizer, it is possible to navigate through the spatial distribution of points-indicators and observe the top 5 matches for the selected indicator and their positions in the three components of PCA. Note that this visualizer is not available through the HTML file as the filter cannot be embedded as it is. Therefore, the graphic source is only available in the software version. 3.3 Model Application for Indicators and Large Texts Training the model against long sentences entails checking how it behaves with small samples of texts extracted from some commitments of the Agenda 2030. When these texts are assessed, the top indicator similarity value declines dramatically compared to the previous assessments with indicators (median of 0.74) due to the length constraints. But even though this happens, the model can still recognise the essential meaning of the sentences overall even if related to some ambiguous indicators (e.g., Health, safety and environmental initiatives and innovations at municipality level). After the first trial application, researchers assess Full and Batch models. This test evaluates the base model (Full) vs. the soft-voting classifier (Batch). The soft-voting classifier takes every sentence, splits them in between every coma and dot, and applies the model separately.Here, it is unclear which model, the batch or the full one, performs better (Annex B). Therefore, the improvement is unclear when applying the batch model over the full model, but it will be worth trying when processing large documents. As a result of this analysis, the software retrieves a Python file (module) containing the necessary functions to work with the model at any time. This will be used in the last step, the PDF Reader Software. 3.4 Test of Indicators Affinity and Unique Words Occurrence Following the organisation and classification of indicators and the subsequent cleaning process, researchers employed the results of the indicators’ matching (Annex C) to analyse the 1 3 Validity of Machine Learning in Assessing Large Texts Through… occurrence of key internal words in the most recurring indicators (cultural) and their counterparts (general). The CSV file comprises a first column containing the cultural indicators to which the resemblance is sought with general indicators. The next five columns contain the general indicators with the highest affinity to the cultural one. The next five columns show the quantitative similarity values of each general indicator with respect to the cultural one. This test of unique words’ matching redounds on understanding how to build or complement more complete indicators or indicators that serve different purposes when effectively applied to specific fields of inquiry. To do the test, researchers analyse the cultural indicators by conducting a quantitative weighting of similar unique words. From Annex C, researchers organised the similarity values for the 284 cultural indicators by ranks, from lowest affinity to highest affinity with the general indicators. Researchers establish Rank 1 for the lowest values of affinity (≥ 0.45 < 0.55), containing a total of 13 indicators. Rank 2 (≥ 0.55 < 0.65) contains 35 indicators, Rank 3 (≥ 0.65 < 0.75) 25 indicators., Rank 4 (≥ 0.75 < 0.85) 19 indicators, and Rank 5 (≥ 0.85 < 0.95) 8 indicators; see Table 4. Within the test of affinity between indicators, the occurrence of unique words within each indicator was sought to understand better how the Roberta algorithm works and the possible reasons for the affinity between indicators. The unique words that were searched for, both in the cultural and general affine indicators within the established ranges, were: Cultural, Heritage, Protection, Preservation, Conservation, Building, and Landscape. Thus, Table 4 reflects whether the word is ever mentioned in the indicators of each rank, either in the cultural indicator or in the general indicators and quantified in terms of percentage of the total number of times it could be mentioned, only once for each set of indicators within ranks. Therefore, and as an example, the word Cultural, within rank 1, is included in twelve indicators, of which two are cultural and ten generals. Similarly, the word Heritage is explicitly referred to in five rank 1 indicators, one cultural and four generals. This single word analysis returns a relevant result for the word Cultural in all affinity ranks; in practically all of them it achieves between a 90 and a 100% of occurrence. In summary, the table returns an intensity in percentage of occurrence of each word (column) correlated with the affinity ranks of indicators (rows). Thus, the highest presence of these unique words among cultural and general indicators occurs in ranks four (4) and five (5), which contain the twenty-seven (27) indicators with the highest affinity (≥ 0.75 < 0.95). Among the unique words selected for the affinity analysis, Cultural and Heritage stand out. Table 4 Occurrence of unique words among indicators by affinity ranks. Legend: (ind) indicator Cultural Heritage Protection Preservation Conservation Building Landscape Rank 1 13 ind 92.31% 12 ind 38.46% 5 ind 7.69% 1 ind 23.08% 3 ind 7.69% 1 ind 15.38% 2 ind 7.69% 1 ind Rank 2 35 ind 82.86% 29 ind 62.86% 22 ind 28.57% 10 ind 25.71% 9 ind 8.57% 3 ind 8.57% 3 ind 8.57% 3 ind Rank 3 25 ind 96.00% 24 ind 76.00% 19 ind 44.00% 11 ind 20.00% 5 ind 12.00% 3 ind 4.00% 1 ind 12.00% 3 ind Rank 4 19 ind 100.00% 19 ind 84.21% 16 ind 47.37% 9 ind 26.32% 5 ind 15.79% 3 ind 5.26% 1 ind 5.26% 1 ind Rank 5 8 ind 100.00% 8 ind 100.00% 8 ind 62.50% 5 ind 37.50% 3 ind 12.50% 1 ind 0.00% 0 ind 0.00% 0 ind 1 3