Text Classification via Large Language Models

Abstract

表达大模型在文本分类上做的不好。
原因:
1、处理复杂语境时缺少推理能力。(e.g… 类比、讽刺)
2、限制学习的上下文的token数。
提出了自己的策略:
** Clue And Reasoning Prompting (CARP).线索与推理提示**
1、能用prompt找到clue(语境线索)
2、能使用K-最近邻算法在上下文的学习中,使得能利用LLM的泛化性和具体任务的全标签功能。
ICL(in-context learning)。

introduction

带有ICL的LLM的效果不如微调后的文本分类模型原因:
1、LLM的推理能力不行
2、上下文学习受限,the longest context allowed for GPT-3 is 4,096 subtokens.
所以比监督学习(文本分类模型)的效果要差一些。

related work

大模型可以泛泛的被分为三类:
1、encoder-only:Bert
2、decoder-only:GPT
3、encoder-decoder:T5

prompt Construction (优化结构)

通过input对于语句的判断(sentiment is positive or negative)做引导,证明这种可行性只需要在few-shot证明即可。
在这里插入图片描述
prompt样例👆

选取输入样例

1、Random:没什么的特殊的,随机选样。
2、kNN Sampling:把xtestx_{test}xtest使用一个encoder模型,选出和xtestx_{test}xtest相近的k个数据,选取相近sentence的方法:
1.SimCSE:基于语义模型做的检索语义相似的example,但是不一定是具有相同标签的示例。
2.Finetuned Model:CARP使用在训练数据集上微调的模型作为kNN编码器模型。
个人理解是在训练前加入了一个encoder模型,然后有针对性的(取相似Q&A)作为大模型的prompt。

线索收集与推理

整个过程是模范(mimics)人的步骤来进行的。

Overview

Clue

表现的更多是一些浅显的词汇分词意思。

Reasoning

表现的是一种通过理解语句的逻辑推理,更深层次的论证,所以更像人类的决定。

### AI Medical Large Model Technology and Applications Artificial Intelligence (AI) in medicine represents an intersection of advanced computational techniques with healthcare practices, aiming to enhance patient care, streamline operations, and improve diagnostic accuracy. The development and application of large language models (LLMs) within this field are particularly noteworthy due to their potential impact on various aspects of medical practice. #### Key Technologies Behind AI Medical Large Models Large language models leverage deep learning architectures such as Transformers, which enable them to process vast amounts of unstructured text data effectively. These models require extensive datasets for training, often sourced from electronic health records, clinical notes, research papers, and other relevant materials [^2]. Additionally, advancements in natural language processing (NLP) allow these systems to understand context-specific terminologies used by clinicians, thereby improving communication between human practitioners and machines. The integration of machine learning algorithms into LLMs allows for personalized treatment recommendations based on individual patient profiles while also supporting predictive analytics that anticipate future health issues before they arise [^1]. #### Practical Applications of AI Medical Large Models One significant area where AI-powered LLMs have made strides is in automating routine tasks traditionally performed manually by doctors or nurses—such as summarizing lengthy discharge summaries automatically using NLP capabilities embedded within the system architecture . Another critical use case involves aiding radiologists during image interpretation sessions; here computer vision combined with ML enhances detection rates significantly compared to conventional methods alone. Moreover, there exists immense potential regarding drug discovery processes accelerated via high-throughput screening simulations powered by sophisticated neural networks trained specifically towards identifying novel compounds suitable candidates against specific diseases targets more efficiently than ever possible previously thought feasible without assistance provided through cutting-edge technologies like those mentioned above. ```python import tensorflow as tf from transformers import TFAutoModelForSequenceClassification def load_model(model_name="bert-base-uncased"): """ Load pre-trained transformer-based sequence classification model. Args: model_name (str): Name of the pretrained model Returns: A TensorFlow Keras model instance ready for fine-tuning. """ model = TFAutoModelForSequenceClassification.from_pretrained(model_name) optimizer = tf.keras.optimizers.Adam(learning_rate=5e-5) model.compile(optimizer=optimizer, loss=model.compute_loss, metrics=['accuracy']) return model ``` This code snippet demonstrates how one might begin working with a Transformer-based model for sequence classification tasks, potentially applicable across numerous domains including but not limited to sentiment analysis, question answering, named entity recognition etc., all highly valuable when considering real-world implementations involving Electronic Health Records parsing among others pertinent scenarios encountered regularly throughout modern-day Healthcare IT landscapes today!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值