Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 16
How to use martian786/TREC_Clinical_Trials_finetune_V1 with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("martian786/TREC_Clinical_Trials_finetune_V1")
sentences = [
"The patient is a 33-year-old woman complained of fatigue, weight gain and abnormal spotting between menses. No hirsutism or nipple discharge was detected. Her BMI was 34. Her lab results were remarkable for high TSH level (13 mU/L) and low free T4 level (0.2 ng/dl). Her anti-TPO levels were extremely high (120 IU/ml). She was diagnosed with Hashimoto's thyroiditis. Her aunt, brother and mother have the same disease. After starting 250 mcg Levothyroxine per day, her symptoms improved significantly and her periods are normal. She is still overweight with BMI of 31. Her most recent thyroid profile revealed all results except for anti-TPO within the normal range:\nTSH: 2.35 mU/L\nFree T4: 2.7 ng/dl\nAnti-TPO: 75 IU/ml",
"Subjects who meet inclusion/exclusion criteria will be entered into the randomized trial.\r\n Randomization will be 1:1 between control group and ablation group. Those randomized to the\r\n control group will receive ICD therapy and routine drug therapy (including antiarrhythmic\r\n drugs as indicated). Subjects randomized to the ablation group will receive ablation therapy\r\n plus ICD for ventricular tachycardia. Patients that refuse ICD therapy and undergo ablation\r\n only will be enrolled in a prospective registry.\r\n\r\n Follow-up will be performed prior to hospital discharge for incision check and device\r\n interrogation as is standard of care. In addition, routine device and clinical follow-up will\r\n be scheduled at 1, 3, 6, 12, 18, and 24 months. Electrocardiography (ECG) will be performed\r\n pre-implant and prior to hospital discharge. Echocardiography (TTE) will be performed\r\n pre-implant and at 12 and 24 months.\r\n\r\n Patients that refuse ICD implantation will not be randomized and will be approached for\r\n inclusion into a registry if they undergo catheter ablation without an ICD. Basic\r\n demographics and medical history will be collected from registry subjects upon enrollment.\r\n Registry subjects will receive follow-up for routine clinical care every 6 months to check on\r\n their overall status.\r\n\r\n 120 subjects will be randomized. An additional 60 subjects will enrolled into the registry.\r\n\r\n As of the time protocol revision C changes were made (07Nov2016), 33 subjects have been\r\n randomized. There has not been any preliminary or interim analysis of any data at this point.\r\n The study-sponsor has not had any access to any clinical follow-up for the patients enrolled\r\n to date.",
"This study is classified as a randomized double-blind clinical trial. Will be held in the\r\n Department of Physiotherapy of the university clinic of the Federal University of Pernambuco,\r\n located in University City, Recife-PE. Data for the survey will be collected during the\r\n course of the Masters in Physiotherapy, from April 2015 to September 2015, for further\r\n analysis.\r\n\r\n The analyzed groups shall consist of women aged 30-50 years referred to the Department of\r\n Physical Therapy - UFPE, with clinical diagnosis of fibromyalgia and migraine performed by\r\n doctors of Rheumatology clinics and Neurology, Hospital das Clinicas, UFPE. Being invited to\r\n participate and informed about its content, saying their participation by signing a Term of\r\n Consent. Data collection is in accordance with the Declaration of Helsinki, and will begin\r\n after the project was approved by the Ethics Committee for Research on Human beings of the\r\n Federal University Health Sciences Center of Pernambuco, in accordance with Resolution\r\n 466/2012 of the National Research Ethics Committee of the Ministry of Health, the body that\r\n regulates research involving human subjects. The study will be registered in the digital\r\n Clinical Trials platform after obtaining the registration number of the Ethics Committee.\r\n Initially there will be a pilot study with 20 women, then the results will be used to\r\n calculate the sample size using the G Power (version 3.1.9.2, Germany), considering a\r\n statistical power (β) of 80% with a significance level (α) of 5%.\r\n\r\n Will be excluded those that have some other rheumatologic disease, cardio-respiratory or\r\n cardiovascular that prevents the realization of aerobic exercise protocol; low attendance\r\n during the implementation of the exercise program (over three consecutive absences);\r\n cognitive impairment or neurological disease that compromises the understanding and the\r\n exercises; Body mass index ≥ 30.0 (obesity, according to the World Society of Health);\r\n pregnant women and patients classified as level of active or very active physical activity by\r\n IPAQ (International Physical Activity Questionnaire).\r\n\r\n 3.1. Randomization\r\n\r\n Initially, patients will undergo will a simple randomization through the site\r\n www.randomization.com, resulting in two groups:\r\n\r\n 1. Aerobic Training: Submitted to a protocol consisting of heating, aerobic training with\r\n adequate heart rate and slowdown;\r\n\r\n 2. Control Training: Heating Protocol with speed and low intensity (heart rate will next\r\n basal).\r\n\r\n Randomization will be performed by an examiner A, not research participant to ensure\r\n allocation concealment (patients and principal investigator will not be aware of which group\r\n are allocated). All women will be evaluated (both groups) through questionnaires and\r\n spirometry before the start and the end of the exercise protocol. Every four weeks, the\r\n patients will be submitted to revaluations through the questionnaires. The evaluation of\r\n these volunteers will be conducted by an examiner B (principal investigator), blinded to\r\n randomization; and the exercise protocol implementation will be the responsibility of the\r\n examiner C, only one will know to which group the patients belong. Corroborating the\r\n double-blinding, the evaluator to perform statistical analysis of the data will not know to\r\n which group belongs the results.\r\n\r\n 3.2. Evaluation\r\n\r\n - Socio-demographic questionnaire Prepared by the researcher to characterize the groups,\r\n which answer questions for identification and history (name, date of valuation,\r\n telephone, address, date of birth, age, weight, height, body mass index / BMI,\r\n profession, education, marital status, physical activity and frequency, use of\r\n medication, type of medication, medication time). One minunciosa history regarding the\r\n use of drugs will be held: types, frequency, duration of treatment.\r\n\r\n - Identification of the impact of migraine Will be evaluated by the Migraine Disability\r\n Assessment Test (MIDAS), which contains five items that measure the amount of days lost\r\n in the activities of daily living (ADLs) and professional (AVPs) due to the presence of\r\n migraine in the last three months; the patient declares the amount of days and, from the\r\n result of the sum of the scores, ranks the degree of disability of the individual (0-5\r\n points: grade I / minimal disability; 6-10 points: grade II / mild disability; 11-20\r\n points: grade III / moderate disability;> 20 points: grade IV / severe disability).\r\n\r\n - Clinical characteristics of the headache Will be filled the journal Headache, based on\r\n criteria established by the International Headache Society (ICHD-III beta version,\r\n 2013); assesses the amount and duration of migraine attacks over a period of 30 days,\r\n pain intensity, symptoms associated with headache, medication use.\r\n\r\n - Investigation of sleep quality The Pittsburgh Sleep Quality Index (PSQI), used to\r\n measure the subjective quality of sleep; consists of 19 items divided into seven\r\n components that punctuate 0-3 (total score of 0-21 points, the higher the score, the\r\n worse the quality of sleep). Was adapted and validated for the Brazilian population by\r\n Bertolazi and colleagues (2011), with a high reliability (α Cronbach = 0.82).\r\n\r\n - Quality of life assessment Measured by the FIQ (Fibromyalgia Impact Questionnaire),\r\n consisting of 19 questions divided into 10 items: the first item has 10 sub-items with\r\n four response options ranging from 0-4 points; the second and third items, the patient\r\n should choose an option on a scale of 0-7; in the other, is given a score of 0-10 in\r\n response (the higher the score, the greater the impact of fibromyalgia on quality of\r\n life). Adapted and validated for the Brazilian population.\r\n\r\n - Tracking of symptoms of anxiety and depression The presence of depression will be\r\n assessed by the Beck Depression Inventory (BDI), consisting of 21 questions that add up\r\n to a maximum score of 63 points (level of depression: 0-9 points = No; 10-18 points =\r\n mild depression; 19- 29 points = moderate depression;> 30 points = severe depression).\r\n It is validated and adapted for the Brazilian population, with a Cronbach's alpha of\r\n 0.81. The Beck Anxiety (BAI) will be used to identify and classify anxiety; consists of\r\n 23 statements that have the maximum score of 63 (0-10 points: minimum Anxiety, 11-19\r\n points: Light Anxiety, points 20-30: moderate anxiety,> 31 points: severe anxiety), is\r\n validated and adapted to Brazilian population.\r\n\r\n - Evaluation of the level of physical activity Proposed by the World Health Organization\r\n (1998), the International Physical Activity Questionnaire (IPAQ) aims to measure the\r\n total physical activity level (AFT) from the energy expenditure (METs.min-¹). Will be\r\n used to short IPAQ (version 8), which consists of 4 questions with two sub-items (b) on\r\n activities of daily living, professional life activities and practice of walking; where\r\n the frequency and duration respond if (days and hours / minutes) of activities and its\r\n intensity (moderate or vigorous = 3.3-4 METs = 5.5 to 8 METs) for one week. From the\r\n data obtained, sum up the frequency and duration of activities (walk + moderate +\r\n vigorous intensity) and, from this result, classifies individuals in: sedentary;\r\n irregularly active; active or very active. This questionnaire is validated and adapted\r\n for the Brazilian population, with excellent reproducibility (ICC = 0.79).\r\n\r\n - Assessment of exercise tolerance Ergospirometry or cardio-pulmonary function test\r\n assesses precisely, the cardio-respiratory capacity and metabolic by direct measurement\r\n of maximum oxygen consumption and determining the maximum ventilatory thresholds. He is\r\n currently considered the gold standard for evaluation of exercise tolerance by providing\r\n non-invasive and very precise exercise intensities featuring aerobic or anaerobic\r\n metabolism (anaerobic threshold - LA). It is the most appropriate test for prescription\r\n of aerobic exercise intensity in sedentary individuals or with regular physical\r\n activity. Oxygen consumption (VO2 max) appears to be the most accurate indicator of\r\n exercise capacity. The test will be performed on a treadmill, coupled with a spirometer\r\n and a computer system in a climatically standardized environment. To minimize air\r\n leakage, will be employed the use of face masks with tiny dead-space. The main\r\n parameters obtained in the test are the ventilatory thresholds: anaerobic threshold (AT)\r\n and respiratory compensation point, which will characterize the aerobic and anaerobic\r\n workouts. The variables obtained during the test, with clinical relevance are: maximal\r\n oxygen uptake (VO2 max), carbon dioxide release (VCO 2), rate of gas exchange (R),\r\n estimated lactate threshold, expired minute volume (VE) , ventilatory reserve (RVE),\r\n ventilatory equivalents, end-expiratory pressures (PEF), ventilatory pattern, arterial\r\n gas tensions / oxyhemoglobin saturation, physiological dead space, electrocardiograms,\r\n heart rate, peripheral O2 saturation (SpO2) and blood pressure (BP ).\r\n\r\n The responses to the cardiopulmonary exercise testing (CPX) are obtained by means of an\r\n incremental protocol, which consists in progressive load increases at predetermined time\r\n periods. A typical incremental protocol should provide: a resting phase (2-3 minutes or\r\n more), in which we observe a lack of hyperventilation before starting the test; a heating\r\n period with zero charge (2-3 minutes); incrementing a time (8-12 minutes) and an active\r\n period of recovery with no load (3-6 minutes if possible). For the intervention protocol,\r\n heart rate obtained just below the anaerobic threshold, recommended for proper intensity to\r\n gain fitness with greater security and compliance will be used. Generally, oxygen consumption\r\n levels in the anaerobic threshold are lower in these patients.\r\n\r\n -Re-Reviews Initially, will be held the evaluation of patients through questionnaires and\r\n cardiopulmonary stress test to investigate exercise tolerance before the start of exercise\r\n protocol (review 1). Every 4 weeks, the patients of both groups will be reassessed by the\r\n re-application of all questionnaires: 4 weeks - review 2; 8 weeks: evaluation 3. At the end\r\n of the 12 weeks of training, the review 4 will be held, with repetition of the questionnaires\r\n and cardiopulmonary exercise testing.\r\n\r\n 3.3. Intervention protocol The intervention protocol will be made by the examiner C, one who\r\n is not blind to the research. After randomization and evaluation, patients will be allocated\r\n to one of the groups: experimental or control. After the evaluation of cardiorespiratory\r\n capacity of patients, will be established starting parameters appropriate to the level of\r\n physical activity each based on heart rate obtained just below the anaerobic threshold\r\n (ensuring aerobic work).\r\n\r\n The experimental group will follow the following protocol: performing heating for 5 minutes\r\n at low speed on a treadmill; after heating, the speed is increased gradually until the\r\n patient reaches the proper heart rate for aerobic training obtained during cardiopulmonary\r\n exercise testing, maintaining the same for 20 minutes to perform the aerobic workout;\r\n completed, the velocity will be decreased to regain speed heating maintained for 5 minutes\r\n and finishing training. It is envisaged that in practice using the FC to ensure proper\r\n aerobic exercise for 20-60 minutes at a frequency of 3-5 times per week are effective in\r\n increasing the functional capacity of individuals with low fitness (American College of\r\n Sports Medicine - ACSM, 2006). In the control group, these women will be guided to perform 10\r\n minutes of heating on the treadmill with a low speed that does not cause patient effort\r\n (monitored by the Borg scale and FC close to the basement).\r\n\r\n Both groups will be followed for 12 weeks, with a driving frequency of 3 times per week.\r\n Heart rate and saturation of peripheral oxygen (SpO2) will be continuously monitored through\r\n the use of finger pulse oximeter during the course of all practices of all the volunteers of\r\n research to ensure that HR is within the established for each group",
"Selenium suppresses autoimmune destruction of thyrocytes and decreases titers of serum TPOAb\r\n in AIT patients. Older 4 clinical trials approved the efficacy of the daily dose of 200micg.\r\n It's believed that Se saturates the deficient stores of GPX so GPX saves the thyrocytes\r\n against to oxidative stresses. Although less than 70 micg/d is sufficient to maximize GPX\r\n activity, none of the authors tested the doses less than 200 micg/d. Our hypothesis was that\r\n If 100 micg/d can not suppress the TPOAb titers,it means autoimmune destruction can not be\r\n blocked by saturation of deficient stores of GPX solely and the mechanism of action requires\r\n more than repletion of deficient stores. It's important not only to estimate the optimal dose\r\n but to understand the mechanism of action. High dose therapy may also suppress TPOAb levels\r\n in Se-non-deficient AIT patients, if it is so, Se therapy may becomes the solely treatment\r\n modality which can suppress the autoimmunity in more than 400 million AIT patients. Because\r\n there've been no way to suppress autoimmune war and replacement of LT4 had been the only\r\n treatment modality for palliation. An other independent part of the study is to test the\r\n effect of Se in adolescent AIT patients."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from sentence-transformers/all-mpnet-base-v2. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
SentenceTransformer(
(0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
(2): Normalize()
)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'41 year old man with history of severe intellectual disability, CHF, epilepsy presenting with facial twitching on the right and generalized shaking in at his NH which required 20 mg valium to cease seizure activity. Per outside medical patient was felt to have focal epilepsy with secondary generalization, likely due to anoxic brain injury at birth, and probably related to the atrophic changes seen on MRI, particularly in the left temporal lobe.\nThe patient first developed seizures at age 13 found by family to have a generalized convulsion. He had a second seizure two years after his first episode. He was maintained on Dilantin and phenobarbital. The patient went 20 years without another seizure. He was recently tapered off Dilantin, and it was felt that perhaps this medication was necessary to maintain him seizure free. The patient had no further events during the hospital course and was back at his baseline at the time of discharge. Full EEG reports are pending at the time of dictation.\nPast Medical History:\nEpilepsy as above, CHF, depression',
'Mesial temporal lobe epilepsy (MTLE) is the most common cause of medication-resistant\r\n epilepsy in adults. The standard treatment for refractory MTLE is surgical resection by\r\n craniotomy. Stereotactic laser interstitial thermal therapy (LITT) is a new surgical\r\n technique being used to treat MTLE. Under MRI-guidance, a laser probe is inserted into the\r\n seizure focus and heat is used to destroy the tissue. Compared to temporal lobectomy, LITT\r\n results in shorter hospital stays, low complication rates, and possibly less cognitive\r\n decline; however, seizure freedom rates are potentially lower.\r\n\r\n During temporal lobectomy, neurophysiologic intraoperative monitoring (NIOM) can be used to\r\n better identify epileptogenic tissue and guide resection. This tool has been unavailable\r\n during LITT procedures. Recently, the investigators demonstrated in two cases that NIOM with\r\n a depth electrode is technically feasible during LITT and can identify epileptiform activity\r\n intra-operatively.\r\n\r\n This is a prospective trial of NIOM during LITT for mesial temporal lobe epilepsy. The\r\n investigators will assess the safety of performing NIOM during LITT and whether data from\r\n NIOM (frequency and characteristics of epileptiform discharges recorded before and after\r\n ablation) are associated with seizure outcomes. If there is an association, NIOM could be\r\n used for prognostication and could potentially even be used to guide surgery.\r\n\r\n Hypotheses:\r\n\r\n 1. NIOM performed by MRI-guided stereotactic depth electrode placed in the parahippocampal\r\n gyrus adjacent to the LITT catheter is safe, as compared to institutional LITT controls\r\n without NIOM and published LITT complication rates.\r\n\r\n 2. Greater magnitude fractional decrements in discharge frequency from pre-ablation to\r\n post-ablation recordings will be significantly associated with better seizure outcomes,\r\n as measured by International League Against Epilepsy (ILAE) surgical outcome scores.\r\n\r\n Objectives:\r\n\r\n The primary project goals are to assess if NIOM by parahippocampal depth electrode is safe\r\n during LITT of MTLE and to assess if the fractional decrement of interictal discharges (ID)\r\n on NIOM can be significantly correlated with outcome. The study will be powered to address\r\n these questions a priori. Post hoc analyses consisting of a multivariate analysis of other\r\n patient demographic data, NIOM findings, operative parameters, quality of life scores, and\r\n neuropsychiatric outcomes will also be assessed.',
"BACKGROUND There is no consensus regarding the injury mechanism in complex prolonged Whiplash\r\n Associated Disorders (WAD) cases. Often, tissue damage and physiological alterations is not\r\n detectable. In order to improve future rehabilitation, a greater understanding of the\r\n mechanisms underlying whiplash injury and their importance for treatment success is required.\r\n It is also important to investigate if pathophysiological changes can be restored by\r\n rehabilitation.\r\n\r\n AIM The projects aims to investigate neck muscle structure and function, biomarkers and the\r\n association with pain, disability and other outcomes before and after neck-specific\r\n exercises.\r\n\r\n METHODS Design These are sub-group trials, each one independent of the others, in a\r\n prospective, multicentre, randomized controlled trial (RCT) with two parallel treatment arms\r\n conducted according to a protocol established before recruitment started (ClinicalTrials.gov\r\n Protocol ID: NCT03022812). Physiotherapist-led neck-specific exercise previously shown to be\r\n effective for the current population constitutes the control treatment for the new\r\n Internet-based neck-specific exercise treatment. In the RCT, a total of 140 patients will be\r\n included (70 from each group), whereof 30 (both randomization arms equally) consecutively\r\n will be asked to participate in the present sub-group study. The sub-group studies aims to\r\n start September 2019. Independent physiotherapists in primary health care will distribute the\r\n treatment.\r\n\r\n In sub-group of individuals, additional measurements will be performed before and after\r\n interventions end (3 months follow-up). The physical measurements will be performed by\r\n independent specially trained test-leaders blinded to randomization.\r\n\r\n Additionally, 30 neck healthy individuals without serious diseases matched for age and gender\r\n will consecutively be investigated.\r\n\r\n Study population\r\n\r\n The inclusion criteria for patients are:\r\n\r\n - Chronic neck problems corresponding to WAD grades 2-3 verified by clinical examination\r\n\r\n - Average estimated pain in the last week at least 20 mm on the visual analogue scale\r\n (VAS)\r\n\r\n - Neck disability of more than 20% on the Neck Disability Index (NDI) [10]\r\n\r\n - Working age (18 - 63 years)\r\n\r\n - Daily access to a computer/tablet/smart phone and Internet\r\n\r\n - Neck symptoms within the first week after the injury (i.e., neck pain, neck stiffness,\r\n or cervical radiculopathy).\r\n\r\n For the present sub group study additional criteria were:\r\n\r\n - Right handed\r\n\r\n - Dominant right sided or equal sided pain\r\n\r\n Inclusion criteria for healthy controls:\r\n\r\n • Age and gender matched healthy individuals without neck pain and disability (VAS <10mm, NDI\r\n <5%) that feel overall healthy without known diseases.\r\n\r\n Exclusion criteria for patients:\r\n\r\n - Individuals with any of the following signs of head injury at the time of whiplash\r\n injury will be excluded: loss of consciousness, amnesia before or after the injury,\r\n altered mental status (e.g., confusion, disorientation), focal neurological changes\r\n (changes in smell and taste).\r\n\r\n - Previous fractures or dislocation of the cervical spine\r\n\r\n - Known or suspected serious physical pathology included myelopathy,\r\n\r\n - Spinal tumours\r\n\r\n - Spinal infection\r\n\r\n - Ongoing malignancy\r\n\r\n - Previous severe neck problems that resulted in sick leave for more than a month in the\r\n year before the current whiplash injury\r\n\r\n - surgery in the cervical spine\r\n\r\n - Generalized or more dominant pain elsewhere in the body\r\n\r\n - Other illness/injury that may prevent full participation\r\n\r\n - Inability to understand and write in Swedish\r\n\r\n Additional criteria in the present sub group:\r\n\r\n - Increased risk of bleeding,\r\n\r\n - BMI >35\r\n\r\n - Contraindications of MRI such as metal, severe obesity, pacemaker and pregnancy.\r\n\r\n Exclusion criteria for healthy controls:\r\n\r\n - Earlier neck injury,\r\n\r\n - Recurrent neck pain,\r\n\r\n - Earlier treatment for neck pain.\r\n\r\n - Increased risk of bleeding,\r\n\r\n - BMI >35\r\n\r\n - Contraindications of MRI\r\n\r\n Recruitment and randomization Information about the study will be provided by healthcare\r\n providers, reports in newspapers, social media, and the university's website. Interested\r\n patients will contact the research team through the project website. After completing a small\r\n survey on the website, a project team member (physiotherapist) will perform a telephone\r\n interview and ask about the patient's medical history. An appointment for a physical\r\n examination and additional interview for the present sub-group study is made as a last step\r\n to ensure that the criteria for study participation are met. If the study criteria are met,\r\n written and oral informed consent are obtained, and the patient will fill out a questionnaire\r\n and undergo physical measurements of neck-related function. Baseline measurements must be\r\n completed for inclusion.\r\n\r\n Healthy individuals will consecutively be recruited among friends, family and staff at the\r\n university or the university hospital to suit the age and gender of a patient.\r\n\r\n Intervention for the patient group The intervention consists of neck-specific exercises\r\n distributed in two different ways, twice a week at the physiotherapist clinic for 3 months\r\n (NSE group) or with 4 physiotherapy visits only combined with a web-based system (NSEIT\r\n group).\r\n\r\n A. In the NSE group, patients will get an explanation and justification for the exercise\r\n consisting of basic information about the musculoskeletal anatomy of the neck relevant to the\r\n exercises given by the physiotherapist in order to motivate the patient and help make them\r\n feel safe and reassured. The patients undergo a 12-week training programme with a\r\n physiotherapist 2 days/week (total 24 times). Exercises are chosen from a clear and written\r\n frame of exercises. The training includes exercises for the deep neck muscles, continuing\r\n with the endurance training of neck and shoulder muscles. The exercises are individually\r\n adjusted according to the individual's physical conditions and progressively increased in\r\n severity and dose. Exercise-related pain provocation is not accepted. The patient may also\r\n perform exercises at home. At the end of the treatment period, the participants are\r\n encouraged to continue practising on their own. The exercises have been used with good\r\n results in previous RCTs.\r\n\r\n B. In the NSEIT group, patients will receive the same information and training programmes as\r\n the NSE group, but with 4 visits to the physiotherapist instead of 24. Exercises are\r\n introduced, progressed, and followed up to ensure correct performance. The exercises are\r\n performed and most of the information is given with the help of Internet support outside the\r\n healthcare system. Photos and videos of the exercises (a clear stepwise progression) and\r\n information are available on the Web-based system. A SMS reminder is automatically available\r\n if the exercise diary is not completed. The time required for training is the same as in\r\n group A, but without the patient having to go to the physiotherapy clinic. The Internet\r\n programme was developed by experienced physiotherapists/ researchers together with\r\n technicians and clinicians. Technicians are available to assist the participants if any\r\n technical difficulties arise. The patients will be introduced to the exercises and get\r\n information and support at the physiotherapy visits.\r\n\r\n Variables and measurements Background data and data in the RCT include personal details,\r\n questionnaires and test results regarding pain, physical and psychological functioning,\r\n health and cost-effectiveness described elsewhere (ClinicalTrials.gov Protocol ID:\r\n NCT03022812).\r\n\r\n Measurements will be done at baseline for both groups and at 3 months follow-up for the\r\n patient when treatment ends. Except for blood and saliva samples that will be collected twice\r\n (baseline and repeated after 3 months), the measurements will be performed at baseline only\r\n for the healthy individuals.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
sentence_0, sentence_1, and sentence_2| sentence_0 | sentence_1 | sentence_2 | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| sentence_0 | sentence_1 | sentence_2 |
|---|---|---|
The patient is a 35-year-old woman with myasthenia gravis, class IIa. She complains of diplopia and fatigue and weakness that affects mainly her upper limbs. She had a positive anti-AChR antibody test, and her single fiber electromyography (SFEMG) was positive. She takes pyridostigmine 60 mg three times a day. But she still has some symptoms that interfere with her job. She is a research coordinator and has 3 children. Her 70-year-old father has hypertension. She does not smoke or use illicit drugs. She drinks alcohol occasionally at social events. Her physical exam and lab studies were not remarkable for any other abnormalities. |
Randomized, double-blind, placebo-controlled, parallel group study is designed to evaluate |
|
the safety, tolerability and efficacy of amifampridine phosphate in patients with MuSK-MG. In |
||
addition, a sample of AChR-MG patients will be assess for efficacy and safety of |
||
amifampridine phosphate. Planned duration of participation for each patient is at least 38 |
||
days, excluding the screening period. Eligible patients will be titrated to an efficacious |
||
dose of amifampridine phosphate and those who demonstrate improvement will be randomized to |
||
either placebo or amifampridine, in a double-blind fashion, for 10 days. |
this randomized controlled trial will compare the impact of routine use of completion |
|
angiography versus using it on selective bases after thromboembolectomy in patients with |
||
acute lower limb ischemia and their impact on limb salvage rates |
||
The patient is a 17-year-old boy complaining of severe migratory pain in the right lower quadrant of his abdomen that started four days ago. The pain is accompanied by nausea and vomiting. He was febrile with tenderness, rebound tenderness and guarding on palpation. His WBC was elevated with dominant neutrophils. CT scan showed evidence of acute perforated appendicitis with free fluid in the pelvis. Diagnostic laparoscopy revealed phlegmon with no other abdominal abnormalities. He is now a candidate for emergent laparoscopic appendectomy under general anesthesia. |
Acute appendicitis is one of the most common causes of abdominal pain in emergency |
|
departments as well as one of the most common indications for emergency abdominal surgery. |
||
The clinical diagnosis has been based on patient history, physical examination and laboratory |
||
findings as well as the "clinical eye" of the surgeon. Still the diagnosis remains |
||
challenging. One of the main problems is that many other disorders can mimic the clinical |
||
presentation of appendicitis, thus increasing the role of imaging techniques to aid in |
||
diagnostic accuracy. Now preoperative imaging in patients with suspected acute appendicitis |
||
is currently widely accepted as the standard of practice, and CT has been shown to clearly |
||
outperform US in terms of diagnostic performance. Nowadays, CT imaging is considered the |
||
primary imaging modality in the diagnosis for acute appendicitis as it is appraised for its |
||
high sensitivity and specificity. The ... |
Urticaria is a common skin disorder that is classified according to its chronicity into acute |
|
and chronic forms. It may occur spontaneously or on exposure to a physical factor. In the |
||
latter case, the urticaria is classified as a physical urticaria . Physical urticaria may be |
||
induced by mechanical and applied pressure, exercise, or exposure to cold, heat, sun, water, |
||
or vibration. The urticarial lesions are generally thought to be the result of mast cell |
||
activation and degranulation, which is supported by the finding of increased levels of serum |
||
histamine during some urticarial flares. Passive transfer experiments, whereupon serum from |
||
affected donors is transferred into recipient s skin followed by physical stimulation with |
||
resultant urticaria at the site of challenge, have been positive in some instances. This |
||
suggests the presence of an intrinsic factor in serum, such as IgE, which then mediates |
||
activation of tiss... |
||
34 year old woman with Marfan's syndrome and known severe mitral valve prolapse with regurgitation, who was planned for a MV repair but was lost to follow-up. She remains symptomatic and is now prepared to undergo mitral valve repair/replacement surgery. EF of 65% on TTE. |
Early feasibility study - multi-center, prospective, single-arm, and non-randomized study |
|
without concurrent or historical controls. |
||
The primary objective of the study is to generate early feasibility data for the CardiAQ™ |
||
Transcatheter Mitral Valve Implant System with the Transfemoral and Transapical Delivery |
||
Systems for the treatment of moderate to severe mitral valve regurgitation in patients who |
||
are considered high risk for mortality and morbidity from conventional open-heart surgery. |
||
The secondary objectives of the study are to evaluate the long-term safety of the device and |
||
the effects of the device on performance, functional, quality of life parameters, and |
||
technical, device, procedural, and individual patient successes. |
||
The study is to be performed at a maximum of 5 investigational sites in the US. |
Acute kidney injury (AKI) is a common complication in patients suffering from acute coronary |
|
syndromes (ACS) and treated by percutaneous coronary intervention (PCI). This complication |
||
has been associated with higher early and late adverse events. It has been emphasized that |
||
the pathogenesis of AKI in the setting of ACS is multifactorial, including age, unstable |
||
hemodynamic conditions, co-morbidities (that is, diabetes mellitus and anemia) pre-existing |
||
chronic kidney disease, dehydration and administration of nephrotoxic drugs. However, the |
||
role of iodinated contrast media (CM) has been well established. Hydration represents the |
||
cornerstone in contrast-induced AKI (CI-AKI) prevention. However, at present there is no |
||
consensus on how hydration should be carried out, especially in ACS patients, and all the the |
||
recommended hydration regimens have limited applicability in the urgent/emergent settings |
||
such as ACS. Several ... |
TripletLoss with these parameters:{
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
"triplet_margin": 5
}
per_device_train_batch_size: 2per_device_eval_batch_size: 2multi_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 2per_device_eval_batch_size: 2per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 3max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Falsefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}tp_size: 0fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters: auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss |
|---|---|---|
| 0.0863 | 500 | 4.6761 |
| 0.1727 | 1000 | 4.4618 |
| 0.2590 | 1500 | 4.3825 |
| 0.3453 | 2000 | 4.3709 |
| 0.4316 | 2500 | 4.2951 |
| 0.5180 | 3000 | 4.322 |
| 0.6043 | 3500 | 4.2719 |
| 0.6906 | 4000 | 4.2655 |
| 0.7769 | 4500 | 4.2715 |
| 0.8633 | 5000 | 4.2587 |
| 0.9496 | 5500 | 4.169 |
| 1.0359 | 6000 | 4.1168 |
| 1.1222 | 6500 | 4.0476 |
| 1.2086 | 7000 | 4.0758 |
| 1.2949 | 7500 | 4.0531 |
| 1.3812 | 8000 | 4.0327 |
| 1.4675 | 8500 | 4.0836 |
| 1.5539 | 9000 | 4.1076 |
| 1.6402 | 9500 | 4.0086 |
| 1.7265 | 10000 | 4.0768 |
| 1.8128 | 10500 | 4.0136 |
| 1.8992 | 11000 | 3.9689 |
| 1.9855 | 11500 | 4.059 |
| 2.0718 | 12000 | 3.9517 |
| 2.1581 | 12500 | 3.9293 |
| 2.2445 | 13000 | 3.9178 |
| 2.3308 | 13500 | 3.98 |
| 2.4171 | 14000 | 3.9394 |
| 2.5035 | 14500 | 3.9541 |
| 2.5898 | 15000 | 3.8973 |
| 2.6761 | 15500 | 3.9268 |
| 2.7624 | 16000 | 3.8798 |
| 2.8488 | 16500 | 3.8903 |
| 2.9351 | 17000 | 3.939 |
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Base model
sentence-transformers/all-mpnet-base-v2