October 26, 2026
TensorFlow Keras Text Classification: A Comparative Analysis of Models for technical failure descriptions
Ricardo Alexandro Alvarenga Ferreira; Anna Carolina Martins
DOI: 10.22167/2675-6528-202603427
Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.
Summary
The manual classification of technical failures in mobile devices, driven by the growing volume of log records and support tickets, proved to be inefficient and costly. An automatic English text classifier was developed for technical failure descriptions (CRs) generated during the validation of mobile phones with global carriers. The TensorFlow Keras library in Python and a JSONL dataset with over 130,000 records were used. Three models were implemented and compared: a simple baseline based on global pooling, a Convolutional Neural Network (CNN), and a Long Short-Term Memory (LSTM) Recurrent Neural Network, aiming to classify critical failure categories. The results indicated that lightweight architectures achieved competitive performance with lower computational cost. The CNN obtained the best validation accuracy (94.56%), followed by the Baseline (93.88%) and LSTM (93.20%), with macro F1-Scores of 0.849, 0.848, and 0.777, respectively. The analysis of confusion matrices revealed that the CNN distinguished semantically close classes with very high precision. It was concluded that, for technical texts rich in local patterns, Convolutional Neural Networks offered the best balance between performance and computational efficiency.
Keywords: Text Classification; Device Manufacturer; Neural Networks; TensorFlow Keras; Mobile Phone Validation.
1. Introduction
In the competitive mobile device market, global manufacturers of smartphones and tablets face a critical operational challenge during the testing and validation phases with telecommunications operators: managing significant volumes of technical records known as Change Requests (CRs). These documents, generated during network certification and new device model approval cycles, describe everything from LTE/5G connectivity failures to protocol incompatibilities, throughput degradations, and behavioral anomalies in controlled field scenarios.
The manual triage of these records is an inefficient and costly task. In a single validation cycle of a device with mobile operators, more than 500 CRs can accumulate over a period of eight to twelve weeks. These records require detailed technical analysis to determine the cause of the failure, whether attributable to the device’s firmware, the operator’s network stack implementation, specific environmental conditions of the test site, or divergent interpretations of 3GPP specifications. Inadequate triage not only delays the time-to-market of new products but also represents a systemic risk that can compromise certifications, violate contractual agreements, and, in extreme cases, result in costly recalls or commercial blocking.
The direct financial impact of this inefficiency masks an even deeper strategic loss: the opportunity cost in the product development cycle. System integration engineers and modem specialists, who are critical and scarce assets, are frequently diverted to bureaucratic tasks of manual triage and classification of CRs. In doing so, they cease to perform high value-added activities, such as modem performance optimization, critical firmware patch development, and root cause analysis of systemic failures, which could prevent impacts of tens of millions of dollars in lost potential revenue.
The historical attempt to mitigate this bottleneck occurred through rule-based systems and keyword matching. Although these approaches appear transparent and auditable, the reality of the mobile device validation domain quickly exposes their limitations. The technical vocabulary used by test engineers is neither static nor standardized, and the polysemy of terms is frequent. For example, the word “connection” appears in various technical contexts, and a rule based solely on its presence would generate incorrect classifications in two-thirds of cases, erroneously assigning responsibility to the manufacturer.
The complexity is aggravated when considering that the correct classification of a CR often depends not on isolated words, but on “causal structures and multi-layered technical context”. Bag-of-words based systems, by ignoring causal relationships and technical dependencies, are incapable of capturing these nuances. Additionally, the writing of CRs by testers from different operators, with proprietary terminologies and spelling variations, contributes to a combinatorial explosion that condemns symbolic approaches to obsolescence in domains of high lexical variability (Sculley et al., 2015).
It is precisely in this context that Deep Learning techniques emerge as a methodological necessity to scale validation operations. Unlike symbolic systems that attempt to explicitly encode knowledge through human-written rules, neural networks learn distributed representations (embeddings) that capture latent semantic similarities directly from historical datasets of previously triaged CRs. Convolutional Neural Networks (CNNs) automatically extract relevant technical n-grams, while Recurrent Neural Networks like Long Short-Term Memory (LSTM) process text as temporal sequences, maintaining memory of previous context to distinguish causal structures. Seminal works like Kim (2014) demonstrated the effectiveness of CNNs, and Hochreiter and Schmidhuber (1997) established LSTMs as state-of-the-art for long-term dependencies. However, device validation CRs have unique characteristics, being short texts, highly terminological, and often structured in semi-formulaic templates. A technical gap persists specifically in the domain of mobile device validation: which neural architecture offers the best balance between classification accuracy, computational cost, and interpretability, a critical requirement when incorrect classification can assign erroneous financial responsibility for bug fixes.
This uncertainty motivates rigorous empirical investigation that, besides identifying the optimal architecture for deployment, generates transferable knowledge about characteristics of specialized technical domains, allowing competing manufacturers to adapt solutions for their own validation environments. The relevance of this study extends beyond the immediate technical contribution to the device manufacturer, offering a reproducible and documented framework that can reduce the average triage time of CRs from fifteen to twenty minutes per record to less than two seconds, freeing up validation teams to focus on effective bug resolution. This work, therefore, proposes to develop an automatic classifier of technical failures in mobile device validation CRs using TensorFlow Keras, rigorously comparing three neural architectures – a Baseline model based on global pooling, a Convolutional Neural Network (CNN), and an LSTM network – on a real dataset of 135,552 CR records collected from certification cycles with global operators over 2023/2025, covering multiple device generations and diverse tier-1 operators in American, European, and Asian markets.
2. Material and Methods
The methodology of this work consisted of an empirical and comparative study, aiming to develop an automatic classifier of technical failures in CRs of mobile devices. The research compared three neural network architectures — a baseline model, a Convolutional Neural Network (CNN), and a Long Short-Term Memory (LSTM) Recurrent Neural Network — to optimize accuracy and computational cost. The historical CR records, extracted from Jira systems of a telecommunications company, constituted the empirical object, collected between 2023 and 2025 from global operators (America, Europe, Asia). Each CR, in JSONL format, contained “summary”, “description”, and “classification”.
The dataset was divided into two partitions. The training set, with 135,552 records, distributed across eight classes of technical failures, presented extreme imbalance (ratio of 153.6:1). The asymmetry was preserved for ecological validity of the models. The test and validation set, with 800 balanced records (100 samples per class), allowed for the measurement of the predictive performance of each class.
Natural language preprocessing (NLP) transformed technical descriptions into numerical representations in four phases. Technical noise cleaning was performed, removing uninformative elements from Jira tickets (reminders, color markings, URLs, identification codes). Next, the text was lemmatized via SpaCy (`en_core_web_sm`), preserving compound technical terms. Tokenization used Keras’s `Tokenizer`, with a maximum vocabulary of 10,000 words. The final vectorization mapped token sequences to 100 fixed positions, with post-sequence padding and truncation.
Three neural architectures were implemented via TensorFlow Keras 2.15 (Sequential API), with common hyperparameters. Word Embedding (`Embedding(10000, 64)`), Adam optimizer (learning rate 0.001), and `sparse categorical crossentropy` loss function were used. The Baseline model applied `GlobalAveragePooling1D` after the embedding, followed by `Dense` (64 neurons, ReLU), `Dropout` (30%), and output `Dense` (8 neurons, softmax).
The CNN implemented local feature extraction with two stacked 1D convolutional layers: 128 filters of `kernel_size=5` (ReLU) and 64 filters of `kernel_size=3`. After convolutions, `GlobalMaxPooling1D` was applied, followed by `Dense` (64 neurons, ReLU), `Dropout` (30%), and output `Dense` (8 neurons, softmax).
The LSTM processed sequences with a Bidirectional LSTM layer (64 units). This was followed by `Dense` (64 neurons, ReLU), `Dropout` (20%), and an output `Dense` (8 neurons, softmax). The `Dropout` was adjusted by the inherent regularization of the LSTM.
The training followed a rigorous protocol for scientific reproducibility. Random seeds (Python, NumPy, TensorFlow) were fixed and environment variables were configured for deterministic operations on GPU. Each model was trained for up to 15 epochs (`batch_size=32`), using `EarlyStopping` (`val_loss`, `patience=3`) and `ReduceLROnPlateau` (learning rate reduction). Data augmentation, class balancing, or fine-tuning were not applied.
The evaluation employed macro and weighted metrics for performance in majority and minority classes. Global accuracy, macro and weighted F1-Score, precision, and recall were calculated. Confusion matrices were used to visualize systematic error patterns and identify confused classes.
3. Results and Discussion
The comparative evaluation of neural network architectures for the automatic classification of technical failures in Change Requests (CRs) revealed crucial insights into the suitability of each model for the specific domain of mobile device validation. The results demonstrated that, although all architectures showed superior performance to rule-based systems, the Convolutional Neural Network (CNN) stood out as the most effective. The analysis focused on accuracy, macro F1-Score, precision, and recall, as well as each model’s ability to handle the extreme imbalance inherent in the dataset, where majority classes like XCAP (35.7%) contrasted with critical minorities like CONNECTION-LOST (0.3%).
Natural language preprocessing, as detailed in the methodology, was fundamental to the quality of the results. Lemmatization via SpaCy, for example, preserved the integrity of compound technical terms, avoiding semantic collisions that stemming, which is simpler, would have introduced. This methodological choice ensured that the dense 64-dimensional embeddings, with a vocabulary of 10,000 words, captured the semantic nuances necessary for precise classification. The empirical calibration of vocabulary size and sequence length (100 tokens) minimized information loss due to truncation and ensured coverage of rare but discriminating terms, essential for minority classes.
Results Analysis: CNN Model
The model based on Convolutional Neural Networks (CNN) demonstrated robust overall performance, achieving a validation accuracy of 94.56% and a weighted F1-Score of 0.9268. These values significantly surpassed the benchmarks of 70-80% commonly observed in rule-based classification systems, confirming Deep Learning’s capability to capture complex patterns in technical telecommunications descriptions. The analysis of accuracy and loss curves during training indicated that validation accuracy closely followed training accuracy, with minor fluctuations but a consistent downward trend in loss, ending below 0.2. This suggests that the model extracted robust features without entering a critical overfitting state, despite the complexity of the convolutional layers.
The detailed analysis of performance by class revealed a disparity, with categories such as ATTACH-FAIL, CA Configuration, and TPUT achieving perfect metrics (100% F1-Score). This indicates that, for failures with highly specific and less ambiguous technical vocabulary, the CNN was extremely effective in identifying the discriminating patterns. However, the CONNECTION-LOST class represented a critical point, with 0% performance. This result is a direct reflection of the low data support (only 6 samples in the test set) and the semantic overlap with other categories, especially IMS-CALL, where the term “connection” is frequently used.
The normalized confusion matrix for the CNN model revealed that 83.3% of CONNECTION-LOST cases were erroneously classified as IMS-CALL. This confusion is attributed to the polysemy of the term “connection” in the telecommunications domain. The CNN model, by focusing on local patterns (n-grams), may have erroneously associated the presence of “connection” with IMS-CALL, which is a majority class in the training dataset. This observation corroborates the initial discussion about polysemy as one of the biggest challenges for automatic classification in technical domains.
It is important to note that signaling failures (ATTACH-FAIL) and carrier configuration (CA Configuration) did not suffer any confusion in classification by the CNN. This finding is vital for network operation, as triage errors in these areas can delay the recovery of essential services. The strong concentration of values on the main diagonal of the confusion matrix for classes such as XCAP, IMS-CALL, and CA Configuration demonstrates that the model successfully learned the distinctive characteristics of most failures, validating the ability of CNNs to extract relevant technical n-grams, such as “codec mismatch” or “carrier aggregation”, regardless of their position in the text.
Results Analysis: Baseline Model (Global Average Pooling)
The Baseline model, which employs an Embedding layer followed by Global Average Pooling, achieved an accuracy of 93.88% and a weighted F1-Score of 0.9195. Although these results are slightly lower than those of the CNN, they demonstrate that, for most telecommunication failure categories, the mere presence of specific technical terms, without considering their order, is already sufficient for correct classification. The training and validation curves for the Baseline were practically overlapping, indicating high generalization capability and stable training, with the validation error decreasing smoothly and predictably, making it a reliable model for production.
Similar to CNN, the Baseline model achieved perfect performance in classes with very specific vocabulary, such as ATTACH-FAIL, CA Configuration, GPS/Positioning, and TPUT. This reinforces that, for categories where technical terms are highly discriminating and less ambiguous, a simpler architecture, which treats text as a “bag of words”, can be effective. However, the CONNECTION-LOST class also remained with 0% F1-Score, evidencing that the problem of this category lies not only in the model architecture but also in the severe dataset imbalance and the ambiguity of the terms.
The confusion matrix of the Baseline model revealed that the classification errors for CONNECTION-LOST were “scattered” among IMS-CALL (50%), MESSAGING (33.3%), and XCAP (16.7%), unlike the CNN which concentrated most of them in IMS-CALL. This dispersion occurs because Global Average Pooling, by calculating the average of word representations, lacks the ability to detect local patterns or word order. Consequently, the model gets confused more easily when generic terms like “lost” or “connection” appear in different contexts, without the contextual nuance that a CNN could capture.
The Baseline model committed a total of 9 errors in 147 tests (6.12%), with the most common error being the classification of CONNECTION-LOST as IMS-CALL (3 times). The complete absence of metrics for CONNECTION-LOST in the bar chart visually highlights the model’s inability to handle minority classes under strong semantic overlap. The precision of 0.0 and recall of 0.0 indicate that the model never “risked” classifying a ticket as CONNECTION-LOST, always preferring classes with more data volume, which is a common strategy in simple models with imbalanced datasets.
Analysis of Results: LSTM (Long Short-Term Memory) Model
The LSTM model achieved an accuracy of 93.20% and a weighted F1-Score of 0.9110. Although these results are significant in absolute terms, this architecture showed the lowest performance among the three tested, falling behind the CNN (94.56%) and the Baseline (93.88%). The analysis of the accuracy and loss curves suggested that the complexity of the LSTM may have led to overfitting in the majority classes, hindering the identification of patterns in categories with few samples. The LSTM training was interrupted at epoch 10 by early stopping, indicating that the validation loss did not improve after that point.
The most alarming data was the drastic drop in Recall for the ATTACH-FAIL class, which plummeted to 33.33%, in contrast to the 100% achieved by previous models. Furthermore, the CONNECTION-LOST class remained at 0% performance, as with the other models. The LSTM confusion matrix revealed that 66.7% of ATTACH-FAIL cases were mistakenly classified as GPS/Positioning. This suggests that the LSTM captured some noisy sequential dependency that correlated signaling failures with positioning terms, something the CNN, focused on local patterns, did not do.
The persistence of the incorrect classification of CONNECTION-LOST as IMS-CALL (83.3%) in the LSTM model reinforces that, regardless of the architecture (be it word average, convolution, or recurrence), the linguistic ambiguity of the term “connection” in the dataset is the main limiting factor. LSTMs are designed to capture long-term dependencies in sequences. However, technical failure descriptions (CRs) are generally short, direct, and rich in keywords. For short sequences and small datasets, the LSTM tends to be “too heavy”, failing to converge to minority classes like ATTACH-FAIL, and the confusion between ATTACH-FAIL and GPS/Positioning suggests that the network may have given excessive importance to terms that appear at the end of sentences, losing the initial technical context that defines the failure.
Consolidation of results
The consolidated comparison of metrics among the three models revealed the superiority of the convolutional architecture. The CNN not only led in global accuracy (94.56%), but also sustained the best indices of macro F1-Score (0.8493) and Macro Recall (0.8644), metrics that are particularly sensitive to dataset imbalance. The Baseline model achieved an accuracy of 93.88% and a macro F1-Score of 0.8478, while the LSTM registered 93.20% accuracy and 0.7765 macro F1-Score. These results are presented in a synthesized manner, allowing for a holistic visualization of each architecture’s performance.
CNN leadership is not merely statistical, but grounded in the intrinsic nature of telecommunications technical logs. Unlike literary or narrative texts, where the long-term sequential dependency that LSTM attempts to capture is vital, crash reports (CRs) are defined by dense, localized technical concepts. The effectiveness of CNN lies in its filters’ ability to act as detectors of specific n-grams, functioning analogously to a terminological saliency mapping. CNN filters focus on identifying adjacent local patterns, such as “handover failure” or “carrier aggregation error”, which is more discriminative for network diagnosis than the global narrative order.
In contrast, the LSTM dispersed its computational capacity trying to process the complete grammatical structure of often noisy or fragmented sentences, which proved less effective for this type of data. The visual contrast in performance between the CNN and the LSTM revealed a sharp drop in the latter’s performance on macro metrics, indicating that the complexity of the recurrent network, by trying to memorize sequences in a dataset of “extreme imbalance”, neglected the minority classes, suffering from overfitting in the higher volume categories. The stability of the Baseline model, which outperformed the LSTM in almost all indicators, reinforces that a robust representation of embeddings, combined with an architecture that does not overload the signal with unnecessary sequential complexity, is preferable for the operational reality of the operators.
In summary, CNN emerged as the strategic choice, offering the highest technical rigor in identifying critical failures without the computational cost and risk of instability of recurrent networks. This ensures the model learns network engineering concepts rather than just statistical noise. The ability to automatically process approximately 472 out of 500 monthly tickets, with an accuracy of 94.56%, represents a direct release of 118 hours of senior engineering for higher value-added activities, translating into competitive advantage and revenue preservation. The results confirm that, for technical texts rich in local patterns, Convolutional Neural Networks offer the best balance between performance and computational efficiency, directly responding to the study’s objective.
4. Conclusion
This work proposed the development of an automatic classifier for technical failures in Change Requests (CRs) for mobile device validation, using the TensorFlow Keras library to compare the performance of three neural architectures: a Baseline model, a Convolutional Neural Network (CNN), and a Long Short-Term Memory (LSTM) Recurrent Neural Network. It was found that manual failure classification, driven by the increasing volume of records, was inefficient and costly, justifying the search for automated solutions. The results demonstrated that the CNN achieved the best validation accuracy (94.56%), outperforming the Baseline model (93.88%) and the LSTM (93.20%). The analysis indicated that the CNN was particularly effective in discerning semantically close classes, attributing this capability to its ability to extract relevant local patterns (n-grams) in short and dense technical texts. The practical contribution of this study lies in delivering a reproducible framework that can reduce CR triage time from minutes to seconds, freeing up senior engineering hours for higher value-added activities, positively impacting the manufacturer’s time-to-market and revenue.
Despite the general success in classifying most categories, a persistent limitation was identified in the performance of all models for the CONNECTION-LOST class, which registered 0% performance. This failure is attributed to the extreme imbalance of the dataset and the polysemy of the term “connection” in the telecommunications domain, where its occurrence in different contexts generated ambiguities that the tested architectures could not fully resolve. For future studies, it is suggested to explore class balancing techniques, such as oversampling or class weighting, and to investigate pre-trained language models based on Transformers, such as BERT. Such approaches can enhance contextual disambiguation capabilities and improve performance in critical minority classes, further consolidating the application of Deep Learning in the triage of technical failures and in the digital transformation of the telecommunications sector.
Bibliographic References
Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory. Neural Computation, 9(8), 1735-1780.
Kim, Y. (2014). Convolutional Neural Networks for Sentence Classification. Proceedings of the EMNLP, 1746–1751.
Sculley, D. et al. (2015). Hidden Technical Debt in Machine Learning Systems. Advances in Neural Information Processing Systems (NIPS), 2503–2511.
Article originating from the Final Course Project of the Specialization in Data Science and Analytics of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform