Papers
Topics
Authors
Recent
Search
2000 character limit reached

SABIA: NLP & Brazilian LLM Overview

Updated 8 July 2026
  • SABIA is an overloaded label referring to both a hybrid NLP system for detecting opioid-related behaviors on social media and a family of Brazilian-centric large language models.
  • The public-health SABIA employs a hybrid BERT-BiLSTM-3CNN architecture, achieving 94% accuracy on a five-class Reddit post classification task.
  • The Brazilian LLM iteration, such as SabiĆ”-3, is optimized for Portuguese tasks and exam performance with lower cost per token.

Searching arXiv for papers on ā€œSABIAā€ and closely related terms to ground the article in current literature. SABIA is an overloaded label in recent arXiv literature. In its most explicit usage, it denotes the hybrid natural-language-processing system introduced for detecting opioid-related user behaviors on Reddit posts (Ahmad et al., 12 Aug 2025). In a separate lineage, ā€œSabiĆ”ā€ names a Brazilian-centric LLM family developed by Maritaca AI, especially SabiĆ”-3 and Sabiazinho-3 (Abonizio et al., 2024), and ā€œSabia 3ā€ also appears as an evaluated model in REST API test generation (Barradas et al., 5 Sep 2025). These usages are distinct, and nearby acronyms such as SABRE, SABER, and SCAI refer to different systems rather than aliases for SABIA (Kabuye et al., 5 Jul 2026, Chou et al., 30 Oct 2025, Melara, 2022).

1. SABIA as a public-health NLP system

In "SABIA: An AI-Powered Tool for Detecting Opioid-Related Behaviors on Social Media" (Ahmad et al., 12 Aug 2025), SABIA is a hybrid NLP classification system proposed for detecting opioid-related user behaviors on social media, specifically from Reddit posts. The paper positions it as an AI-powered tool for public health surveillance, motivated by the growing role of social media in opioid-related discourse, including discussions of misuse, recovery, prescribing, and illicit drug dealing.

The core problem is that opioid-related activity online is difficult to monitor automatically because users often rely on slang, abbreviations, misspellings, coded expressions, and fragmented and informal syntax. The paper argues that this matters because social media has become a venue not only for support and disclosure, but also for drug distribution and covert transactions, especially involving opioids. SABIA is therefore designed to identify fine-grained behavioral categories that can support surveillance, intervention, and analysis of online opioid ecosystems.

The task formulation is a five-class single-task text classification problem over user posts. The five classes are Dealers, Active Opioid Users, Recovered Users, Prescription Users, and Non-Users. This is a behaviorally specific taxonomy relative to prior studies in the paper, which are described as focusing mostly on binary distinctions such as user versus non-user. In implementation terms, SABIA is described as a BERT-BiLSTM-3CNN hybrid deep learning model intended to capture contextual semantics via BERT, sequential dependencies via BiLSTM, and local phrase patterns via parallel CNN filters (Ahmad et al., 12 Aug 2025).

2. Corpus construction, labeling, and class structure

The dataset was constructed from Reddit using the Python Reddit API Wrapper to connect to Reddit’s official API. The authors selected four subreddits: r/opiates, r/choronicpain, r/OpiatesRecovery, and r/addiction. Data were collected over a 15-month period, from January 2, 2023 to April 4, 2024 (Ahmad et al., 12 Aug 2025).

To guide scraping, the authors built a keyword dictionary covering formal opioid terminology, slang, misspellings, and coded language. The examples listed in the paper include formal terms such as opioid, heroin, oxycodone, and fentanyl; slang and variations such as oxy, narc, fent, dope, smack, black, chocolate, perk, and roxie; misspellings such as heroyn, codein, codiene, herioin, percacet, fentnil, fentnyl, oxycontn, oxocodien, and narcan; and coded or encrypted expressions such as ā€œTickets for tonight,ā€ ā€œSnow for the party,ā€ ā€œCandy for sale,ā€ ā€œBTB,ā€ and ā€œplugin available, tap in.ā€ After collection, the authors removed duplicates, empty posts, and irrelevant posts. The final dataset contains 5,764 posts, 22,767 sentences, 350,207 words, and a vocabulary of 15,134 unique terms (Ahmad et al., 12 Aug 2025).

The annotation process used the first author plus two domain experts, described as PhD students in computer science with research interests and prior annotation experience in opioid crisis detection. A pilot annotation phase used 500 Reddit posts; all three annotators independently labeled this subset, then discussed disagreements and refined the guidelines. After refinement, they labeled the remainder of the corpus, with disagreements resolved through discussion, regular calibration meetings, and majority voting. The reported inter-annotator agreement is Cohen’s Kappa = 0.79, which the paper interprets as substantial agreement (Ahmad et al., 12 Aug 2025).

Class Posts Share
Active User 1,877 32.57%
Dealer 1,499 26.01%
Non-User 1,391 24.13%
Prescription User 685 11.88%
Recovered User 312 5.41%

The paper states that the dataset exhibits moderate class imbalance, especially because Recovered Users are a relatively small class. It also states that the annotated dataset was split into 80% training and 20% testing while maintaining class balance across subsets, although a separate validation split is not explicitly reported (Ahmad et al., 12 Aug 2025).

3. Architecture, representation flow, and optimization

SABIA is a stacked hybrid architecture combining BERT, a BiLSTM, and three parallel 1D CNN branches. The paper specifies bert-base-uncased and BertTokenizer, with each input post tokenized into subword tokens, augmented with [CLS] and [SEP], and represented through input_ids and attention_mask. Sequence length is standardized with padding = max_length, truncation = True, and a maximum sequence length of 128 (Ahmad et al., 12 Aug 2025).

The BERT encoder produces 768-dimensional contextual embeddings per token. These embeddings are fed into a BiLSTM with hidden size 128, one LSTM layer, and bidirectional operation, yielding a 256-dimensional output vector per token and an output tensor explicitly stated as [batch_size, sequence_length, 256]. For convolution, this tensor is permuted to [batch_size, 256, sequence_length] (Ahmad et al., 12 Aug 2025).

The convolutional stage uses three parallel 1D CNN layers with kernel sizes 2, 3, and 4. Each branch has 128 output channels and uses ReLU activation, followed by global max pooling. The three pooled outputs are concatenated into a 384-dimensional vector, regularized with dropout = 0.3, and passed to a fully connected layer producing five class logits. The final prediction is obtained with softmax over the five labels: Dealer, Active User, Recovered User, Prescription User, and Non-User (Ahmad et al., 12 Aug 2025).

The paper describes the operational pipeline in four stages: data preprocessing, representation of data using SABIA, a fine-tuning phase, and classification of user behavior into five labels. The reported hyperparameters are: pretrained model bert-base-uncased, max sequence length 128, batch size 16, learning rate 2Ɨ10āˆ’52 \times 10^{-5}, epochs 4, dropout 0.3, BiLSTM hidden size 128, BiLSTM layers 1, bidirectional True, CNN kernel sizes 2, 3, 4, CNN out channels 128 each, optimizer Adam, loss CrossEntropy, padding max_length, truncation True, and random seed 80. The wording strongly suggests end-to-end fine-tuning, but the paper does not explicitly state in a single sentence that all BERT parameters were updated (Ahmad et al., 12 Aug 2025).

The preprocessing pipeline includes removing duplicates, removing empty posts, filtering non-English content using language detection, lowercasing, removing punctuation, removing HTML tags, removing irrelevant numerals, correcting domain-specific misspellings via a custom opioid dictionary, tokenization, stopword removal, lemmatization, and export to structured CSV with metadata. The libraries explicitly mentioned are NLTK and spaCy (Ahmad et al., 12 Aug 2025).

4. Empirical performance and comparative position

The central reported result is that SABIA achieves Accuracy = 0.94, Precision = 0.94, Recall = 0.94, and F1-score = 0.94 (Ahmad et al., 12 Aug 2025). The baseline highlighted in the paper is Logistic Regression with accuracy = 0.86, and the paper claims that SABIA improves accuracy by 9.30% over this baseline. The comparison spans classical machine learning, deep learning, transformer transfer learning, and seven prior studies summarized in the paper.

Among the machine-learning baselines using TF-IDF features, Logistic Regression is the strongest reported baseline with Precision = 0.88, Recall = 0.86, F1-score = 0.86, and Accuracy = 0.86. XGBoost is reported at 0.81 across precision, recall, F1-score, and accuracy; Decision Tree at Precision = 0.58, Recall = 0.62, F1-score = 0.58, Accuracy = 0.62; and SVM at Precision = 0.82, Recall = 0.73, F1-score = 0.68, Accuracy = 0.73 (Ahmad et al., 12 Aug 2025).

Among the deep-learning baselines, the best reported model is BiLSTM + GloVe with Precision = 0.91, Recall = 0.91, F1-score = 0.91, and Accuracy = 0.91. In the transformer and hybrid comparisons, BioBERT is reported at 0.91 accuracy, XLM-R at 0.92, BERT-base-uncased at 0.91, and SABIA at 0.94 (Ahmad et al., 12 Aug 2025).

Model family Strongest reported model Accuracy F1-score
Machine learning Logistic Regression 0.86 0.86
Deep learning BiLSTM + GloVe 0.91 0.91
Transfer learning XLM-R 0.92 0.92
Hybrid proposed SABIA 0.94 0.94

Class-wise discussion in the paper reports that Dealer reaches Precision = 1.00, Recall = 1.00, and F1 = 1.00; Prescription User reaches Precision = 0.98, Recall = 1.00, and F1 = 0.99; Recovered User reaches Precision = 0.97, Recall = 1.00, and F1 = 0.98; Active User reaches Precision = 0.89, Recall = 0.91, and F1 = 0.90; and Non-User reaches Precision = 0.90, Recall = 0.84, and F1 = 0.87 (Ahmad et al., 12 Aug 2025). The paper’s discussion therefore identifies Dealer, Prescription User, and Recovered User as the easiest classes, while Non-User is explicitly described as occasionally confused with others because of overlapping language in general opioid discussions.

The paper includes a figure labeled as a confusion matrix of SABIA, but the matrix values are not readable in the supplied text. It does not report ROC curves, AUC, macro- versus micro-averaged metrics explicitly for SABIA, or calibration results. It also does not provide a dedicated ablation study isolating the contribution of slang handling, the BiLSTM, or specific CNN branches (Ahmad et al., 12 Aug 2025).

5. Limitations, ethics, and reproducibility boundaries

The paper explicitly identifies several limitations. The dataset is restricted to Reddit, so results may not generalize to X/Twitter, Instagram, Telegram, Facebook, or encrypted messaging platforms. It also acknowledges that drug slang evolves rapidly and that ambiguity is common, creating ongoing annotation and model-maintenance challenges. The system is text-only and does not use images, videos, user metadata, or network information. SABIA is framed as a single-task classifier, and the authors note that future work could include multi-task or longitudinal learning (Ahmad et al., 12 Aug 2025).

The study’s reproducibility is moderate but incomplete. Reported details include the platform, collection tool, date range, subreddit list, total posts, label set, 80/20 train/test split, preprocessing stages, main SABIA hyperparameters, and baseline settings. Not reported are framework versions, exact BERT pooling or final-hidden-state usage, whether BERT was fully fine-tuned or partially frozen, scheduler or warmup, early stopping criteria, class weighting, validation split, gradient clipping, hardware specifications, exact random-seed handling beyond one number, and confidence intervals or multiple-run averages (Ahmad et al., 12 Aug 2025).

One inconsistency noted in the technical summary is that the preprocessing section says stopword removal and lemmatization were applied, while the SABIA section later states that text is tokenized using BertTokenizer from bert-base-uncased. The paper does not fully clarify whether the exact same preprocessed text was passed to all model families or whether transformer inputs retained more raw text. A related inconsistency appears in the baseline table, where Random Forest appears in the hyperparameter table but the main results table reports Decision Tree rather than Random Forest; the paper does not resolve this editorial issue (Ahmad et al., 12 Aug 2025).

The paper does not provide a long standalone ethics section, but it states that ethical considerations and privacy-preserving techniques must be prioritized in future work and deployment. The issues implicated in the study include mining user-generated social media content for sensitive health and drug behaviors, privacy concerns around identifying vulnerable users, potential misuse by surveillance or enforcement actors, and the risk of false positives, especially when distinguishing legitimate prescription use, recovery, and illicit activity. The paper does not discuss fairness auditing, demographic bias analysis, consent issues, or IRB information in detail (Ahmad et al., 12 Aug 2025).

6. The SabiĆ” language-model lineage and the broader naming landscape

A distinct usage of the name appears in the "SabiĆ”-3 Technical Report" (Abonizio et al., 2024). There, SabiĆ”-3 is Maritaca AI’s flagship Portuguese-first, Brazil-specialized LLM, introduced together with a smaller and cheaper sibling, Sabiazinho-3. The models were trained on a large brazilian-centric corpus, with TPU v5 accelerators using JAX and a combination of data parallelism and model parallelism. The report states that both SabiĆ”-3 and Sabiazinho-3 support sequences up to 32,000 tokens and positions the family as deliberately specialized for Portuguese and especially Brazil-related tasks rather than as a general multilingual foundation-model line (Abonizio et al., 2024).

The technical report’s strongest empirical focus is on Brazilian academic and professional multiple-choice exams. Across the 70 exams administered after mid-2023, the average accuracies reported are Claude 3.5 Sonnet 80.5%, GPT-4o 80.6%, SabiĆ”-3 80.2%, Llama-3.1 405B 77.0%, Sabiazinho-3 72.1%, Llama-3.1 70B 71.3%, GPT-4o Mini 69.9%, and SabiĆ”-2 Medium 68.9%. The abstract states that SabiĆ”-3’s average performance matches frontier LLMs while being offered at three to four times lower cost per token (Abonizio et al., 2024).

A third, more operationally narrow appearance occurs in "Combining TSL and LLM to Automate REST API Testing: A Comparative Study" (Barradas et al., 5 Sep 2025), where SabiĆ” 3 is included in the evaluated model set alongside GPT-4o, LLaMA 3.2 90b, Claude 3.5 Sonnet, Gemini 1.5 Pro, Deepseek R1, Mistral Large, and Qwen 2.5 32b. The authors state that, beyond selecting seven popular models, they included one more LLM to ensure the presence of a model with higher accuracy in interpreting prompts in Portuguese, choosing the Brazilian model SabiĆ” 3 (Maritaca). In that paper, SabiĆ” 3 is therefore an evaluated LLM within the RestTSLLM pipeline rather than the name of the pipeline itself (Barradas et al., 5 Sep 2025).

Several near-matches should not be conflated with SABIA. "Agentic SABRE" is Semantic–Behavioural Arbitration for Ransomware Evaluation, an uncertainty-aware neuro-symbolic multi-agent framework for adaptive ransomware detection (Kabuye et al., 5 Jul 2026). "SABER" appears in arXiv both as Symbolic Regression-based Angle of Arrival and Beam Pattern Estimator (Chou et al., 30 Oct 2025) and as Self-Aware Belief Estimator for RAG (Zhu et al., 11 May 2026). "SCAI" is Software Supply Chain Attribute Integrity (Melara, 2022). These systems occupy different research areas and are not stated aliases, variants, or naming overlaps with SABIA in the cited texts.

Taken together, current arXiv usage makes ā€œSABIAā€ a polysemous research label rather than a single unified framework. The most direct exact-title usage is the opioid-behavior classifier on Reddit (Ahmad et al., 12 Aug 2025). The accent-marked ā€œSabiĆ”ā€ designates a Brazilian-centric LLM family (Abonizio et al., 2024), and ā€œSabia 3ā€ also functions as a model name in multilingual LLM evaluation for REST API testing (Barradas et al., 5 Sep 2025). For technical precision, these usages are best treated as distinct entries rather than as successive versions of one system.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to SABIA.