Vetnews | Oktober 2025 18 « BACK TO CONTENTS The ReLU (Rectified Linear Unit) activation function (8) is defined as: ReLU is widely used due to its simplicity and effectiveness, as it avoids the vanishing gradient problem that can occur with other activation functions like Sigmoid [77]. However, ReLU can lead to dead neurons, where neurons become inactive and stop learning. Variants like Leaky ReLU and Parametric ReLU have been introduced to address this issue [78]. The Sigmoid activation function (9), defined as: It is often used in the final layer of binary classification models. It maps the output to a value between 0 and 1, making it suitable for probability estimation. However, Sigmoid suffers from the vanishing gradient problem, which can slow down training [79]. For multi-class segmentation tasks, Softmax is typically used in the final layer. Softmax normalises the output probabilities for each class, ensuring they sum to 1. It is defined as (10): Where xxii represents the input to the ρρ-th class. Softmax is particularly useful for multi-class classification, as it allows the network to assign probabilities to multiple classes and select the most likely class for each pixel [80]. 3.2.2 GPT-4 and GPT-4o Large Language Models (LLMs) such as ChatGPT, Mistral, Gemini, Claude, and Llama have demonstrated significant potential in medical diagnostics by aiding in symptom analysis and preliminary diagnosis. Each of these models brings unique strengths to processing medical data. For instance, ChatGPT excels at handling complex medical data and producing fluent, context-rich responses, while Mistral is specifically designed for efficient query resolution. Similarly, Gemini adapts well to dynamic conversational settings, and Claude offers a well-rounded approach to general data analysis. Despite these advantages, most of these models are challenged when tasked with complex, multisymptom medical scenarios, as their architecture primarily focuses on textual understanding rather than deep multimodal analysis [69]. The introduction of GPT-4 marks a notable advancement over these earlier models. While the previously mentioned LLMs excel at interpreting symptom descriptions and providing initial diagnoses, GPT-4 surpasses them with its ability to incorporate context-driven responses and integrate detailed multimodal inputs [81]. More importantly, its evolved version, GPT-4o, extends the capabilities of the original model by incorporating object detection and segmentation tasks, which are critical in image-based diagnostics. This enhancement makes GPT4o particularly valuable for tasks requiring a combination of natural language processing and detailed image analysis, as seen in veterinary ophthalmology diagnostics. The GPT-4 model, recognised for its robust performance in languagerelated tasks, has been innovatively adapted for image analysis, deviating from its primary design as a text-processing engine. This unconventional application involves using images as input, where the model is expected to generate outputs that align with the visual content observed, rather than textual data. This method leverages the model’s latent ability to handle multimodal tasks despite its foundational design as a language model [82]. While GPT-4 exhibits capabilities in image classification, it inherently lacks direct functionalities for object detection and segmentation—key components in detailed image analysis. Addressing these limitations, the enhanced version, GPT-4o, introduces mechanisms to perform these tasks by generating segmentation masks akin to those in ground truth data of test images, marking a significant enhancement over its predecessor [83]. The core architecture of GPT-4 is built upon the Transformer model, specifically tailored for language generation but applicable to a broader range of sequence processing tasks. This architecture is illustrated in Figure 12. [63] and encompasses several critical components: • Embedding Layer: Converts input tokens into rich, informative embeddings, supplemented with positional encodings to preserve the sequential nature of the input data. • Multi-Head Attention: This mechanism allows the model to dynamically focus and refocus on different segments of the input data, facilitating a deeper understanding of the contextual interdependencies within the data. • Feed-Forward Networks: Positioned to process the data sequentially from the attention mechanisms, these networks are pivotal in refining the data handling. • Residual Connections and Layer Normalisation: These components are integral for maintaining the flow of gradients during training, thus enhancing the stability and performance of the model. • Output Layers: Comprising a linear layer followed by a softmax activation, these layers predict the likelihood of the next token in the sequence, based on the processed embeddings. Leading Article 8 9 10 Figure 12. The architecture of a Transformer Decoder block is utilised in the GPT model. The process starts with embedding both the input tokens and their positional information. These embeddings are processed through several layers of multihead attention and feed-forward networks, each layer followed by normalisation. The model's final output is produced by a linear layer followed by a softmax function. This design enables the model to attend to various parts of the input sequence concurrently, improving its ability to understand context and make accurate predictions
RkJQdWJsaXNoZXIy OTc5MDU=