SearcharxivSearch

arXiv subjects

Gustavo Santos

Publications and source records attributed to Gustavo Santos.

5 recordsLinked to original sources

The Hidden Environmental Cost of Poor Coding Practices in TensorFlow and Keras Applications: A Study on Resource Leaks and Carbon Emissions

Efficiency and sustainability are critical considerations in the development and deployment of machine learning (ML) applications. Among the factors influencing sustainability, resource leaks in ML code can introduce hidden inefficiencies that elevate energy consumption and CO2 emissions. Despite this, empirical evidence quantifying their environmental impact remains limited. This emerging results paper presents an initial empirical investigation of two common resource-leak smells, namely Improper Model Reuse (IMR) and Unreleased Tensor References (UTR), and their impact on energy consumption and CO2 emissions in TensorFlow and Keras workloads. Controlled experiments were conducted for each smell by executing identical training tasks while comparing against a smell-free baseline. Our preliminary results show that both smells consistently increase estimated electricity usage and carbon emissions. IMR and UTR increased electricity consumption by approximately 32% and 46%, respectively, with proportional increases in CO2 emissions. Paired statistical tests indicate that these differences are systematic and statistically significant, providing initial empirical evidence that resource-leak smells may degrade ML energy efficiency and environmental sustainability. These findings suggest that resource-leak smells pose measurable risks to both software quality and sustainability, emphasizing the importance of integrating resource-lifecycle management and energy-efficiency considerations into ML development.

cs.SE

A Relational Model of Neighborhood Mobility: The Role of Amenities and Cultural Alignment

Why are some neighborhoods strongly connected while others remain isolated? Although standard explanations focus on demographics, economics, and geography, movement across the city may also depend on cultural styles and amenity mix. This study proposes a relational, cross-national model in which local culture and amenity mix alignment creates a "soft infrastructure" of urban mobility, i.e., symbolic cues and functional features that shape expectations about the character of places. Using ~650 million Google Places reviews to measure co-visitation between U.S. ZIP codes and ~30 million Canadian change-of-address to track residential mobility, results show that neighborhoods with similar cultural styles and amenities are significantly more connected. These effects persist even after controlling for race, income, education, politics, housing costs, and distance. Urban cohesion and segregation depend not only on who lives where or how far apart neighborhoods are, but on the shared cultural and material ecologies that structure movement across the city.

cs.SI

From Code Smells to Best Practices: Tackling Resource Leaks in PyTorch, TensorFlow, and Keras

Much of the existing ML research focuses on model performance metrics, leaving limited attention to the long-term sustainability and resource efficiency of ML applications. While high performance is essential, ensuring efficient resource management is equally critical for robust deployment. This study addresses this gap by systematically identifying code smells that lead to resource leaks in ML applications. We conducted an empirical investigation of developer discussions and real-world code snippets from PyTorch, TensorFlow, and Keras. The analysis identified 30 PyTorch-related smells and 16 TensorFlow/Keras smells linked to resource leaks. These smells were categorized in two ways: (1) based on their root causes, and (2) as general ML smells with framework-specific characteristics. For each smell, we derived at least one best practice, resulting in 50 recommended coding patterns aimed at reducing resource leakage and improving efficiency. To ensure the validity of our findings, we employed a three-phase validation process involving independent analysis by three authors followed by consensus discussions. This is the first comprehensive study to examine resource-leak-inducing code smells across major ML frameworks and to present actionable best practices for mitigating them. The contributions support developers in building more efficient and sustainable ML applications and offer a structured view of the underlying causes of resource leaks.

cs.SE

Neutrality May Matter: Sentiment Analysis in Reviews of Airbnb, Booking, and Couchsurfing in Brazil and USA

Information and communications technologies have enabled the rise of the phenomenon named sharing economy, which represents activities between people, coordinated by online platforms, to obtain, provide, or share access to goods and services. In hosting services of the sharing economy, it is common to have a personal contact between the host and guest, and this may affect users' decision to do negative reviews, as negative reviews can damage the offered services. To evaluate this issue, we collected reviews from two sharing economy platforms, Airbnb and Couchsurfing, and from one platform that works mostly with hotels (traditional economy), Booking.com, for some cities in Brazil and the USA. Trough a sentiment analysis, we found that reviews in the sharing economy tend to be considerably more positive than those in the traditional economy. This can represent a problem in those systems, as an experiment with volunteers performed in this study suggests. In addition, we discuss how to exploit the results obtained to help improve users' decision making.

cs.SI

AngularJS in the Wild: A Survey with 460 Developers

To implement modern web applications, a new family of JavaScript frameworks has emerged, using the MVC pattern. Among these frameworks, the most popular one is AngularJS, which is supported by Google. In spite of its popularity, there is not a clear knowledge on how AngularJS design and features affect the development experience of Web applications. Therefore, this paper reports the results of a survey about AngularJS, including answers from 460 developers. Our contributions include the identification of the most appreciated features of AngularJS (e.g., custom interface components, dependency injection, and two-way data binding) and the most problematic aspects of the framework (e.g., performance and implementation of directives).

cs.SE