Evolutionary trade-offs and machine learning in Bean Beetles: Behavioral Effects of Juvenile Hormone and the automation of Morphological Measurements
*This author wrote this paper as a senior thesis under the direction of Dr. Sugata Banerji & Dr. Flavia Barbosa
ABSTRACT
This thesis presents a dual exploration in the study of the bean beetle Callosobruchus maculatus. The first aspect investigates Juvenile Hormone (JH) influence on the behavior and morphology of C. maculatus by manipulating JH levels in adults through abdominal injections. JH is critical for the regulation of both developmental and physiological processes. It is linked to resource allocation trade-offs between wings and gonads during the larval stage. However, its effects on adults are not fully understood. The second aspect pioneers the development of an automated machine learning model for measuring and classifying morphological features using neural networks and computer vision. The findings offer new insights into the behavioral effects of JH and show the potential of automation to revolutionize data collection methodologies in animal behavior. This dual approach not only advances our understanding of evolutionary trade-offs in bean beetles but also showcases the integration of technological advancements in biological research.
Section 1: Neuroscience and Behavior
1a) Life history theory
Life history theory is a fundamental framework in biology that seeks to understand the allocation of resources among competing life history traits in organisms (Stearns, 1977). Life history traits are influential to organisms’ survival, growth, reproduction, and fitness. They include traits such as longevity, growth rate, age and size at maturity, and reproductive patterns (Roff, 1992). At the core of life history theory are trade-offs, which are the inevitable compromises that organisms must undergo when allocating resources to one history trait over another. This unavoidable allocation occurs because resources are finite. Organisms are constantly subjected to environmental and evolutionary pressures that lead to the evolution of allocation strategies for energy, time, and other limited finite resources. These strategies are not the result of conscious decision-making. They are shaped through natural selection to optimize survival and reproductive success. Therefore, investing a resource in one trait reduces the availability of that resource for another trait and vice versa (Barbosa, Rebar, & Greenfield, 2018). For example, some species of birds face trade-offs between clutch size and egg size, balancing the number of offspring with the investment in each offspring's size (Godfray, Partridge & Harvey, 1991).
Even though all species are subject to natural selection to maximize their lifetime reproduction, individuals tend to employ different strategies to achieve that. This leads to trade-offs between different life history traits across species. For instance, species that allocate more energy towards immediate reproductive success face a trade-off between current reproduction and future survival (Johns et al., 2018). Similarly, individuals who invest heavily in offspring development early in life may experience higher risks as they age (Johns et al., 2018). However, trade-offs are not always straightforward. Empirical studies often reveal positive or no correlations between pairs of costly traits where negative correlations were expected (Gascoigne, Uwera Nalukwago & Barbosa, 2022). This inconsistency could be explained by the hierarchical nature of trait investment, as suggested by the tree model of allocation (de Jong, 1993). In this model, different traits occupy different positions in a hierarchical tree, and their covariances are predicted based on their positions. For instance, traits closer to the base of the tree, such as growth and somatic maintenance, are expected to have strong negative covariances, while traits in the upper branches, like reproductive traits, may have weak positive covariances or none at all (Gascoigne, Uwera Nalukwago & Barbosa, 2022; de Jong, 1993). Somatic maintenance includes cellular repair, physiological functions, and resistance to stressors. Thus, in this case, insects face a trade-off between somatic maintenance and reproduction. This trade-off can alter their lifespan, reproductive output, quality of life, and overall fitness. Therefore, individuals that allocate more resources to somatic maintenance may face delayed reproductive maturation with fewer offspring, yet increased longevity (Jacot, Scheuber & Brinkhof, 2004).
Environmental factors, such as larval density in the bean beetle, Callosobruchus maculatus, can also influence the pattern of trait covariances by inducing differential resource allocation (Gascoigne, Uwera Nalukwago, & Barbosa, 2022). High larval density, for example, can lead to increased investment in dispersal traits at the expense of reproductive traits, resulting in a trade-off between wing size and gonad size in males (Gascoigne, Uwera Nalukwago, & Barbosa, 2022). Thus, the complexity of trade-offs is often shaped by both environmental factors and individual variability. In the absence of an environmental stressor, trade-offs might not be apparent, as competing traits within an individual may not show distinct negative covariances. Furthermore, the relationship between two traits can differ based on individual differences in acquiring and allocating resources. Mathematical models suggest that a positive covariance between costly traits occurs when individuals significantly vary in resource acquisition but not in allocation, whereas a negative covariance arises when the opposite is true (Noordwijk and de Jong, 1986). Therefore, understanding the complexity of trade-offs is vital to understanding evolutionary biology, adaptations, and mechanisms of fitness optimization (Sih et al., 2010).
Behavior, as a life history trait, is crucial to influencing organisms’ fitness and mediating trade-offs. Behaviors including mating, foraging, parental care, and territoriality can play a direct role in organisms’ ability to acquire resources, successfully reproduce, or avoid predators (Campbell et al., 2005, Chapter 51 & Stamps, 2007). To further understand how behavior influences trade-offs, researchers have set up various experimental techniques to study it. For example, researchers have tried to investigate growth, reproduction, or survival, which are all fitness-related traits, through manipulating certain behaviors.
These manipulations can be understood through phenotypic correlations, experimental manipulations, genetic correlations, and correlated responses to selection (Bolund, 2020). Phenotypic correlations involve observing the relationship between different traits within a population. For example, researchers might study the correlation between foraging behavior and reproductive success in a population of birds. This approach can help identify potential trade-offs between different behaviors. Alternatively, Farina and Gil experimentally manipulated factors that alter foraging behavior through manipulating food resources in honeybee’s environment; allowing them to measure life history traits, showcasing that experimental manipulations involve directly altering a behavior and observing the effects on other traits (Gil & Farina, 2002). Whereas genetic correlations involve studying the genetic basis of different traits and how they are related. For example, researchers like Moore et al., investigated the genetic correlation between aggressive behavior and territoriality in a population of Tuatara (Moore, Daugherty, & Nelson, 2009). This approach can help identify genetic factors that influence multiple behaviors. Further, researchers comparatively examined how behavioral variation correlates with adaptations and differences in life history traits and trade-offs among different species, taxa, and populations (Leroi, Rose, & Lauder, 1994). In other words, Leroi et al. (1994) correlational approach can help identify how selection on one behavior can influence other traits.
Each one of those techniques has its advantages and disadvantages. Phenotypic correlations, for example, are relatively easy to measure in natural populations and can provide insights into potential trade-offs between different traits. However, they do not imply causation and may be confounded by environmental factors. Therefore, if the aim is to imply causation, the use of experimental techniques is advised. Experimental manipulations can establish causality because they directly manipulate one trait and observe the effects on others. Nonetheless, they are limited by the difficulty of replicating natural conditions and can raise ethical concerns at times. Additionally, genetic correlations are useful for understanding the heritability of life history traits and their relation to other traits, but they require knowledge of the genetic architecture and may not capture the full complexity of behaviors influenced by multiple genes and environmental factors. Lastly, correlated responses to selection can illustrate the evolutionary consequences of selection on one trait for other traits and help in understanding how traits evolve together over time, but they require long-term studies and can be challenging to interpret in complex ecological contexts.
The ability to understand and examine behavior as a life history trait equips us with valuable insights into the evolutionary and adaptive strategies that organisms utilize to cope with ecological and environmental challenges in order to optimize their fitness. However, even though there has been an extensive amount of research into life history theory, there are still limitations in our understanding of behavior as a life history trait (Sih et al., 2010). We need to further integrate behavioral studies with physiological and morphological exploration of life history traits. By doing so, we can fill these gaps in our knowledge and gain deeper understanding of how behaviors contribute to fitness, trade-offs, and evolutionary adaptations. Besides, we could further understand the mechanisms influencing behavior and impacting trade-offs.
Insects are a particularly interesting group for studying behaviors within the context of evolution and life history traits. They exhibit diverse behavioral patterns, reproductive strategies, and unique interactions with their environments (Mousseau & Fox, 1998). They also face lots of ecological challenges, including predation, competition for resources, and environmental variability, that force them to constantly encounter trade-offs (Sih, Bell, & Johnson, 2004). Furthermore, insects make a great study organism for exploring complex life history traits and trade-offs. Besides the ease of their laboratory maintenance, they live relatively short generation times and in large population sizes. Thus, we are able to study neural mechanisms underlying their behavior through various available techniques, making them ideal for exploring hormonal influences on behavior, especially since they rely on hormones to regulate various aspects of their behavior.
1b) Hormones and behavior
In the context of life history theory and trade-offs, understanding the role of hormones in mediating behavior provides insights into the mechanisms underlying evolutionary adaptations and fitness-related trade-offs. Hormones act as chemical messengers that regulate neural processes and control the expression of life history traits and behaviors such as foraging, mating, reproduction, social interactions, and aggression (Nelson, 2024; Karigo & Deutsch, 2022; Garland, Zhao, & Saltzman, 2016). They can influence insects’ adaptive responses by integrating both internal physiological states with external environmental cues. Therefore, measuring behavior allows us to deepen our understanding of the hormonal influence that is regulating certain behaviors. Even though this thesis focuses on manipulating juvenile hormones, various hormones affect insect behavior.
Ecdysteroids are insect hormones that are known for regulating developmental processes like metamorphosis and molting (Truman & Riddiford, 2002). They were found to be involved in insect adult behaviors as well (Mirth & Riddiford, 2007). Variations in their levels have been linked to changes in multiple aspects of insects’ behavior. For example, researchers have found that fluctuations in vitellogenin, which is a yolk precursor protein impacted by ecdysteroid levels, trigger changes in foraging and labor behavior in honebees, Apis mellifera, impacting their ability to locate, acquire, and utilize food resources differently. (Amdam et al., 2003) Moreover, ecdysteroids levels influence reproductive activities, which influences mate-seeking behaviors, courtship rituals, copulation, and oviposition behaviors that are vital for reproductive success (Rauschenbach et al., 2000). Additionally, ecdysteroids have been implicated in regulating circadian rhythms and sleep patterns in some insect species such as adult fruitflies, Drosophila melanogaster, affecting their courtship memory (Ishimoto, Sakai, & Kitamoto, 2009). These regulations affect the timing and duration of locomotor activity, rest periods, and daily behavioral rhythms, which are all vital for optimizing resource allocation. Therefore, ecdysteriods play a significant role in insects physiology, behavior, and life history traits.
Similarly, neuropeptides and neurohormones impact behavior through modulation of the nervous system. Neuropeptides like octopamine serotonin play essential roles in regulating locomotor activities and feeding behaviors in Caenorhabditis elegans (Flavell et al. 2013). Additionally, Andrews et al. (2014) found that octopamine modulates social behaviors, including aggression and courtship in Drosophila melanogaster. Furthermore, research on multiple organisms including honeybee and Drosophila melanogaster has found that octopamine is insects’ equivalent of adrenaline and can influence arousal, motivation, and stress responses (Bobrovskikh & Gruntenko, 2023; Even, Devaud, & Barron, 2012). Thus, fluctuations in neuropeptides levels influence behaviors related to resource acquisition and predator avoidance. Likewise, neurohormones such as corazonin have been implicated in regulating behaviors related to insect stress responses and aggression (Zhao et al., 2010; Khan et al., 2021). It functions similarly to the mammalian Gonadotrophin Releasing Hormone (GnRH), indicating its significant role in development, internal states, and behavioral decision-making. Corazonin regulates systemic growth, food intake, stress responses, and homeostasis by interacting with short Neuropeptide F (sNPF) and the steroid hormone ecdysone (Khan et al., 2021). Corazonin neurons also have a sex-dependent lifespan differences under various stresses in Drosophila melanogaster (Zhao et al., 2010) Comparably, insulin-like peptides and adipokinetic hormones (AKH) influence feeding behaviors, metabolism, and energy balance in response to nutritional cues and environmental stressors (Koyama et al., 2020). They act in a manner analogous to insulin in mammals, with effects on the insulin signaling pathway being central to stress resistance, lifespan, and metabolic homeostasis (Zhang & Liu, 2014; Koyama et al., 2020)
Lastly, insects’ sex hormones, which include ecdysteriods and juvenile hormones, play an essential role in regulating reproductive behaviors. They modulate sex-specific behaviors and sexual differentiation in insects as well as various other life-history traits (Pan, Connacher & O'Connor, 2021). JH is the most well-known hormone in insects due to its involvement in many parts of their lives. It has been shown that an increase in JH levels is accompanied by an increase in mating behaviors and reproductive success in D. melanogaster and bedbugs (Flatt et al., 2005; Reiff et al., 2015; Gujar & Palli 2016). Similarly, an increase in JH titer is often correlated with increased aggression (Pandey, Motro & Bloch, 2020). These findings highlight the importance of further investigating JH due to their complex and diverse involvement in insects’ life cycle from early development to adulthood.
1c) Juvenile Hormones
Juvenile hormones are a group of hormones that highly contribute to the development of insects, particularly regarding insects’ sexual growth and maturation as well as morphology (Koeppe et al., 1985). They have been well-documented in their involvement in modulating the development of trait polymorphism and sexual dimorphism (Zera, 2004; Guerra, 2011). Trait polymorphism refers to the occurrence of two or more distinct traits, such as color, size, or shape, within a population of the same species. Usually, polymorphism allows a species to better adapt to the environment. For example, many butterflies' populations have polymorphic wing patterns, allowing them to better blend into their respective environments (Wallbank et al., 2016). Whereas sexual dimorphism refers to the sex-based differences in appearance within the same species. These differences are beyond their sexual organs. They can include variations in size, color, or the presence of certain phenotypic features. For example, peacocks tail feathers are sex-dependent where male peacocks have colorful tail feathers while the female peacocks have dim subdued feather coloration (Petrie, Halliday & Sanders, 1991).
JH are insect acyclic sesquiterpenoids produced by the corpora allata (CA), which is a tiny factory-like organ near the insects’ brain that produces important hormones. The surgical removal of corpora allata eliminates the source of JH secretion (Yamamoto, R. et al., 2013). Acyclic sesquiterpenoids are a subgroup of complex organic chemicals called isoprene, which act as building blocks. Isoprenes come together in a particular way to create juvenile hormones. However, JH biosynthesis is controlled by neuroendocrine and neuronal factors (Shinoda, 2016). This means that the production of JH is complex and controlled by various conditions, which matches its role. The primary functions of JH are linked to molting, wing development, and sexual maturation (Iwanaga, & Tojo, 1986; Koeppe et al., 1985). For instance, elevated levels of JH in caterpillars are associated with larval molting, whereas low JH levels signal the initiation of pupation, which leads to adult formation through metamorphosis (Yamamoto et al., 2013; Kayukawa et al., 2017). Likewise, wing development is influenced by JH in various degrees. For example, JH promotes Br–C expression, which in turn promotes wing growth and development in cockroaches (Fernandez-Nicolas et al., 2022). Similarly, Zhang et al (2020) found that JH regulates flight capacity and migration within a sensitive period in armyworm, indicating the importance of time and the sensitivity of development to time windows. Lastly, researchers have noted that JH levels fluctuate to reflect insects’ reproductive organ development. For example, JH levels increase at the onset of sexual maturity, ensuring that reproduction occurs only when individuals are physically capable of it (Robinson & Vargo, 1997).
During the pre-emergence stages of insects, JHs are involved in coordinating the development and differentiation of various tissues and organs (Truman et al., 2024). They also regulate multiple essential processes, such as larval growth, metamorphosis, and the formation of adult structures and features. For example, JH delays metamorphosis until larvae reach an appropriate stage (Smykal et al., 2014). They also prevent ecdysone-induced changes in gene expression, which are essential for metamorphosis (Gilbert, 2000). This is essential for ensuring the emergence of the right structures. Thus, previous research has shown the importance of JH for shaping morphology and developmental trajectories during those pre-emergence stages.
JHs continue playing an essential role in insects during the post-emergence stages. They are key to modulating biological processes such as ovarian maturation, behavior, caste determination, diapause, stress response, and life span during adulthood (Rahman et al., 2017). Particularly since JHs are secreted in different concentrations and levels by the corpus allatus throughout most of the insects’ life cycle. For example, blocking JH action in adult female Locusta migratoria eliminates the production of the major yolk protein (vitellogenesis) or induce vitellogenesis with higher JH (Grozinger et al., 2014). Whereas in honeybees, studies have shown that JH acts as a behavioral peacemaker; as it regulates the speed in which worker bees grow, transition from nest activities to foraging (Robinson & Vargo, 1997). These findings indicate JH’s role as a gonadotropin hormone with a variety of essential roles that are time dependent (Koeppe et al. 1985). For instance, early manipulation of JH during the adult stage has induced sexually dimorphic effects on the behavior of Drosophila melanogaster’s mature adults (Argue, K. J. et al., 2013). The sexually dimorphic role for JH in the modulation of insects’ behaviors post-emergence seems to be contingent on the age of adults (Argue, K. J. et al., 2013).
Guo, W. and colleagues (2020) explored the influence of JH on the behavior of locusts, which are a group of grasshopper species. Interestingly, they found that JH induced a complete behavioral shift from attraction to repulsion and vice versa. Their study suggests the involvement of JH in mediating a cascade of internal physiological processes that control how they act (Guo, W. et al., 2020). JH can do so by binding to specific receptors on target tissues and modulating gene expression. This modulation ultimately influences the development of traits mentioned earlier, like polymorphism, sexual dimorphism, and behavior.
Therefore, juvenile hormones and life history traits as well as trade-offs are intimately linked. They influence the direction of resource allocation. Thus, directing resource investment towards reproduction, survival, maturation, or growth. For example, in resource-limited conditions, JH would prioritize survival over reproduction, which will lead to a delay in maturation, reduction in fecundity, or an increased investment in somatic maintenance (Dao-Wei Z. et al., 2019). The opposite would be expected to happen with an abundance of resources, where JH would favor allocating more resources for reproduction and sexual maturity in insects. As highlighted, juvenile hormones mediate many trade-offs that insects face under different conditions.
1d) Development
It is evident that insects undergo many trade-offs. However, some trade-offs are more well-documented than others. Nonetheless, many trade-offs occur during the developmental stages. For instance, insects must balance investment in growth and body size with investment in reproductive processes and structures (Breiner, Whalen, & Worthington, 2022). Individuals that allocate more resources to growth may delay sexual maturation and reproductive investment, potentially compromising their immediate reproductive success and vice versa (Barbosa, Rebar & Greenfield, 2018).
A well-documented developmental trade-off is between wing development and reproduction. Researchers suggest that JH mediates trade-offs between investment in wing development and reproductive efforts (Zera, 2004). This trade-off between wings and reproduction is a common phenomenon observed in insects, where resources allocated to wing development may significantly impact the resources available for reproduction, influencing an insect's fitness and survival in its environment (Zera, 2004; Contreras-Garduño et al., 2011). The trade-off between investing in wings versus reproduction is not just a matter of resource distribution. It also involves hormonal regulation, with JH being at the forefront of this regulatory mechanism. Therefore, explaining the mechanisms underlying the effect of hormones on development and trade-offs would allow us to gain a deeper understanding of how insects adapt to their environment. Especially because JH has a pivotal role in mediating this trade-off between wings and reproduction. This trade-off is evident in wing polymorphic insects. For example, Zera & Zhang (1995) showed that a reduced activity of juvenile hormone esterase, which is linked to a lower JH degradation, correlates with the development of short-winged morphs in the Jamaican field crickets. In other words, this means that higher JH levels are correlated with the development of short-winged cricket morphs. Alternatively, aphids provide another interesting exploration pathway. Aphids are small yet ecologically significant pests. They exhibit an evolutionary adaptation known as wing dimorphism, where individuals within the same species can develop to be either winged or wingless morph. This adaptation occurs due to environmental challenges and pressures such as overcrowding and resource scarcity. Each one of the two morphs has its advantages, yet it comes at a cost. For example, winged morphs can disperse to new locations when conditions become unfavorable, allowing the species to spread and find new resources. However, the dispersal comes at the cost of reproduction. On the other hand, the wingless morphs are more common when conditions are stable, focusing on rapid reproduction without the energy cost of developing wings (Blackman & Eastop, 2000). This evolutionary change represents a strategic adaptation that ensures the survival of aphids (Ogawa & Miura, 2014). Here, too, JH mediates the trade-off between wing development and reproduction. Researchers have found that JH levels significantly affect the development of winged versus wingless morphs in aphids (Braendle et al., 2006). JH acts as a mediator between environmental and developmental cues (Brisson, 2010; Braendle et al., 2006). In particular, high levels of JH are associated with the promotion of the wingless morph, encouraging rapid reproduction in favorable conditions (Braendle et al., 2006). Conversely, low JH levels can trigger the development of winged morphs, preparing individuals for dispersal in response to environmental stressors (Braendle et al., 2006). Here, we see JH playing a pivotal role in developing both physical and mechanistic responses to environmental stressors and trade-offs.
1e) Bean Beetles
Bean beetles, Callosobruchus maculatus, were used to explore the aims of this research. These beetles typically have a reddish-brown to black coloration and measure around 2-4 millimeters in length as adults. Callosobruchus maculatus is a species that has been key to studying behavior (Gascoigne et al., 2021;), morphology (Gascoigne et al., 2021;), molecular and biochemical (Zelaya et al., 2020; Berasategui et al., 2021), as well as life-history traits and trade-offs (Gascoigne et al., 2021; Schade & Vamosi, 2012). They make a great match for understanding the hormonal influence on behavior for various reasons. In addition to having been used intensively, the bean beetle’s life cycle is key to understanding the effect of hormonal manipulations. They undergo a complete life cycle, which consists of egg, larva, pupa, and adult beetle. They take around 4 weeks to emerge out of their beans and don’t require any food. Additionally, adult bean beetles experience short adulthood, lasting only 10 days, with 1-2 days to reach sexual maturity post-emergence. Therefore, these characteristics of C. maculatus life cycle make it suitable for studying hormonal manipulation during early adulthood.
Nonetheless, previous research is limited in outlining the role of JH during adulthood. This gap in knowledge presents an opportunity for further investigation into JH functions and mechanisms of action, particularly during adulthood. Thus, this study aims to explore the influence of JH during adulthood on morphology and behavior in bean beetles. Therefore, I intend to expand our understanding of the link between hormones, behavioral, and morphological traits during adulthood. Additionally, this project is an attempt to expand our understanding of the role that time and development periods have on behavior and morphology.
1f) Research, Aim, and Hypothesis
Before exploring the study's aim, we generated a hypothesis to predict the research findings. I hypothesize that in the adult stage, JH mediates behavioral traits in male and female C. maculatus with little to no impact on morphological traits. Specifically, higher JH titter will intensify mating behaviors in male and female bean beetles. Previous research done in the lab has started exploring the effects of JH on C. maculatus resource allocation on their behavioral and morphological traits. That research focused on manipulating JH during the larval stage and later measuring adult traits. Thus, allowing us to have a better understanding of the underlying hormonal mechanisms mediating the hierarchical trade-offs in morphology and behavior pre-adulthood. Later it showed that morphology, but not behavior, was influenced by the hormonal changes. Therefore, the previous JH research imposes a need to investigate the role of JH during adulthood through looking at both morphology and behavior.
Section 2: Data Science
Time is scarce. Driven by that thought and the need to optimize time, the idea for this project was born. More specifically, during my time at the Barbosa Lab, I lived and witnessed hours pass by as my lab mates and I attempted to classify and measure the various morphological aspects of the dissected beetle. This lengthy process becomes time-consuming when dealing with hundreds of samples. Therefore, the main computational problem that my thesis explores is finding an automated measurement machine learning model and a classification model for the various classes using computer vision.
2a) History of Machine Learning Evolution
The journey of machine learning (ML) began in the mid-20th century, rooted in the desire to create computational models that can adapt and learn from data. The first explorations in the field were influenced by Warren McCulloch and Walter Pitts’ work on cybernetics and the idea of neural networks in 1943 (Piccinini, 2020). These models were inspired by the understanding of biological processes and aimed to replicate the way human brains operate (Shepherd, 2010).
In the 1950s, Alan Turing proposed the concept of a machine that could learn and evolve (Turing, 1950). This concept was the base of the "Turing Test”, which became a criterion for intelligence (Turing, 1950). This era also saw the development of the Perceptron by Frank Rosenblatt in 1957, which is an early neural network that could perform simple classification tasks (Copeland, 2024). However, the excitement was tempered by the realization in the 1960s and 1970s that these early models had limitations, particularly in their ability to solve non-linear problems or learn complex patterns, which killed the interest in ML and AI (Haigh, 2024; history, n.d.). Nonetheless, the 1980s witnessed a revival of interest in ML due to the introduction of new algorithms and models, including decision trees, Support Vector Machines (SVM), and backpropagation for neural networks (Polson & Sokolov, 2020; Rumelhart, Hinton, & Williams, 1986; Cortes & Vapnik, 1995). These developments, alongside increased computational power and the accumulation of larger datasets, set the stage for significant advancements and the regeneration of people’s interests and hopes.
Following the 80s developments, the 1990s and 2000s witnessed the consolidation of ML as a critical component of artificial intelligence, with the introduction of deep learning and reinforcement learning (Haigh, 2024; Li, 2018). This was particularly driven by the success of deep learning models, especially Convolutional Neural Networks (CNNs), in image recognition tasks, highlighting the potential of ML to address increasingly complex problems and non-linear tasks.
2b) Computational Review of the Evolution of Machine Learning
Here, I want to explore the evolution of machine learning through a mathematical lens. Especially since the history of machine learning is tied to increasing complexity in mathematical models and computational techniques.
Perceptron (1957): The Perceptron model is considered one of the earliest neural network architectures. It computes a weighted sum of its input features and applies a step function to determine the output class. Mathematically, the Perceptron's decision function for an input vector x can be represented as:
𝑦=𝑓(𝑤⋅𝑥+𝑏)
where w denotes the weight vector, x represents the input feature vector, and b is the bias. This model laid the foundational computational framework for later neural networks, illustrating the potential of weight-based computation for classification tasks (Li, 2018).
Backpropagation (1980s): The discovery of the backpropagation algorithm marked a significant advancement in training multi-layer neural networks and exploring non-linear relationships, which revived the interest in ML. This algorithm uses the chain rule of calculus to compute gradients efficiently for each layer in a network. This process is essential for adjusting the network's weights during training. Specifically, backpropagation calculates the gradient of the loss function with respect to each weight by the chain rule, enabling a systematic reduction in error through gradient descent optimization. The computational expression for updating a weight wij in the network is given by:
where η is the learning rate, L is the loss function, and (∂L/∂wij) represents the partial derivative of the loss with respect to the weight wij. This discovery laid the groundwork for the development of deep learning (Sukhbaatar, Szlam, & Fergus, 2016; Li, 2018).
Support Vector Machines (1990s): SVMs introduce a different approach to classification, focusing on the construction of an optimal hyperplane that maximizes the margin between different classes. The primary goal of an SVM is to determine the optimal hyperplane that separates classes in a feature space. The optimal hyperplane is the one that has the maximum margin, which is the largest distance between the hyperplane and the nearest points of any class (known as support vectors). The optimization problem can be formalized as follows:
where xi are the input vectors, yi are the class labels, w is the normal vector to the hyperplane, b is the bias, and ||w|| is the Euclidean norm of the vector w. This formulation leads to a convex optimization problem that ensures a global minimum allowing SVMs to handle linear and non-linear classification (Scholkopff, & Smola, 2001; Li, 2018).
Convolutional Neural Networks (CNNs): CNNs, a class of deep neural networks, are specially designed for processing data with a grid-like topology, such as images. A CNN autonomously learns hierarchical patterns in data through convolutional layers, which apply filters to capture spatial dependencies in input data. The operation within a convolutional layer for a filter k can be mathematically described as:
Where S(i,j) represents the output of the convolution at point (i,j), I is the input image, K is the kernel (filter) applied to the image, and S is the feature map produced by the convolution, m is the row indices, and n is the column indices. This algorithm iterates over the entire image and applies the kernel in order to produce the feature map. This formula, combined with pooling layers and fully connected layers, enables CNNs to learn complex patterns in data, from basic edges to intricate object features, which makes them exceptionally capable and suitable for complex image recognition tasks (Zagoruyko & Komodakis, 2017; Li, 2018; Alzubaidi et al., 2021).
2c) History of Computer Vision and Classification
Classification algorithms are at the heart of many machine learning and computer vision tasks. At its core, computer vision seeks to replicate the human visual system, allowing computers to identify, process, and interpret visual data (Blei and Smyth, 2017; Provost and Fawcett, 2013). The beginning of this field can be traced back to the 1960s with the emergence of Artificial Intelligence and the work of Larry Roberts (Verdict, 2020). Larry Roberts in 1963 worked on reconstructing 3D images from 2D images, which marked the initial steps toward enabling machines to interpret visual data similarly to how humans do (Verdict, 2020).
However, computer vision's early years were focused on basic tasks such as pattern recognition and simple object detection. These tasks were approached with rule-based algorithms that processed images as multi-dimensional arrays of pixel intensities. Techniques like filtering, thresholding, and edge detection were developed to manipulate these pixel values for extracting meaningful information, which laid the groundwork for the present time’s more complex image understanding.
Therefore, during the 1970s and 1980s research efforts focused on the development of foundational algorithms for more advanced image processing tasks. These included complex edge detection, feature extraction, and understanding the motion structure, crucial for recognizing shapes and objects within images. For example, in the 1970s, scientists started developing optical character recognition technology (Schantz, 1982). This technology allowed computers to be able to recognize printed text. Alternatively, in the 1980s, neuro and computer scientists like David Murr and Kunihiko Fukushima integrated their intersectional work to produce pivotal image and visual processing models, edge-detecting algorithms, and neural networks’ convolutional layers (Russell, and Norvig, 2009; Li, 2018). Thus, this period was marked by an exploration of how to accurately represent and categorize visual information, and integrating machine learning techniques, which allowed scientists to move from rule-based processing to models that could learn from data.
2d) Computational Review Main Computer Vision Concepts
Here, I will explore the main concepts of computer vision through a mathematical lens.
Edge Detection: Mathematically, edge detection can be seen through the lens of gradient calculation. The gradient of an image, represented as ∇I(x,y), measures the change in intensity across the image. A popular method for finding edges is the Sobel operator, which approximates gradients by convolving the image with a pair of 3x3 kernels, one estimating the gradient in the x-direction (Gx) and the other in the y-direction (Gy).
The magnitude of the gradient is given by:
(BenHajyoussef, & Saidani, 2024)
Feature Extraction: Feature Extraction can identify and isolate meaningful attributes or characteristics within the image data. It translates raw image data into a format or set of features suitable for classification algorithms (Vega-Rodriguez, 2004). A common framework for feature extraction is Principal Component Analysis (PCA), which seeks to reduce the dimensionality of the data while preserving as much variance as possible (Banerji, Zunker, & Sinha, 2020). It is essentially a process of simplifying complex data. Imagine having a dataset with numerous variables, and some of these variables share similar information. PCA helps find a more straightforward way to express this data without losing much of its valuable information. It identifies the main patterns in the data (directions where there is the most variance) and redefines the dataset in terms of these patterns (Banerji, Zunker, & Sinha, 2020). This results in a simplified version of the data, where the most important trends are highlighted, and the less informative, redundant aspects are minimized. PCA involves calculating the eigenvectors (non-zero vectors that do not change direction) and eigenvalues (magnitude of the stretch) of the data's covariance matrix, then selecting those that correspond to the largest eigenvalues, and using them to transform the original data into a new space with reduced dimensionality (Banerji, Sinha & Liu, 2012; Banerji, Zunker, & Sinha, 2020). Alternatively, a Histogram of Oriented Gradients (HOG) is used to obtain a representation of the image’s shape and texture (Banerji, Sinha & Liu, 2012). It involves calculating and binning gradient directions across localized regions of an image, which encapsulates the structure within a feature vector (Banerji, Sinha & Liu, 2012). In particular, HOG calculates each pixel’s gradient’s magnitude and direction and then these gradients are accumulated in a histogram over specific image regions (Banerji, Sinha & Liu, 2012).
In other words, the image is divided into small, connected regions, called cells, and for each cell, a histogram of gradient directions or edge orientations is compiled. The concatenation of these histograms then forms the feature descriptor.
2e) Feature Descriptor Techniques
In the field of image analysis, feature descriptors play a crucial role in transforming raw data into a more compact and expressive representation for further processing. In this study, four main types of feature descriptors were used to extract meaningful information from images of bean beetles: Local Binary Patterns (LBP), Histogram of Oriented Gradients (HOG), Contour-Based features, and Color Histograms. Each one of these descriptors captures unique characteristics of the images, which are pivotal for the subsequent classification and analysis tasks.
Local Binary Patterns (LBP) is a texture descriptor that is used extensively in image analysis due to its robustness and computational efficiency. LBP operates by comparing each pixel with its surrounding neighbors, assigning a binary code that results from the comparison. These binary codes are then compiled into a histogram, which serves as the final feature descriptor. LBP is particularly effective in capturing fine textural patterns, making it well-suited for differentiating subtle variations in texture that distinguish various morphological traits.
The Histogram of Oriented Gradients (HOG) descriptor is primarily used for object detection and is highly effective at capturing edge and gradient structures. HOG works by dividing the image into small, interconnected regions known as cells, where for each cell, a histogram of gradient directions or edge orientations is compiled. The complied histograms get normalized over larger blocks of cells to improve accuracy and provide resistance to illumination variations. The combination of these histograms forms the feature descriptor.
Contour-Based features focus on capturing the shape and silhouette of objects within an image, which is achieved by analyzing the boundaries or contours of the objects. This technique is particularly useful for distinguishing objects based on their geometric and spatial characteristics. Notably, these features discard the information about the color distribution in the images. Therefore, the extracted features are a full representation of the edges and shape of the object rather than the combination of that with its colors.
Lastly, Color Histograms, on the contrary, are used to represent the distribution of colors within an image. By measuring the intensity of different color bins across the image, this descriptor provides a robust perception of color distribution which can be crucial for classification tasks where color is a distinguishing feature.
2f) Rationale, Hypothesis, and Aim
Based on the literature review and a thorough examination of the dataset, data types, and project needs, I hypothesize that using Support Vector Machine models would be able to classify the classes well. However, I anticipate challenges with feature extractions due to the nature of my images. Therefore, I predict a need for various feature extraction techniques in order to maximize classification accuracy. Further, I believe that the use of pre-trained machine learning models would be useful for further training a model to measure the length of the morphological trait. Therefore, I hypothesize that an intersection between manual and automated processes would lead to the best outcome when it comes to building a model with the highest measurement accuracy and best reliability.
Note: Eukaryon is published by students at Lake Forest College, who are solely responsible for its content. The views expressed in Eukaryon do not necessarily reflect those of the College. Articles published within Eukaryon should not be cited in bibliographies. Material contained herein should be treated as personal communication and should be cited as such only with the consent of the author.