text
string
source
string
benchmarks, using Pass@1 (P@1) and Maj@16 (M@16) as evaluation metrics. Additionally, we compare against two open-source models: DeepSeek-R1-Distill- Qwen-7B [ 12], which is trained on an unreleased set of 800k instructions, and OpenR1-Qwen-7B [ 9], which uses 94k instructions from the OpenR1-Math dataset. We evaluate ...
https://arxiv.org/abs/2505.17266v2
fewer than 10k tokens. Conversely, using a small fraction of randomly sampled data leads the model to acquire only shallow reasoning patterns, resulting in repetitive 8 10000 11000 12000 13000 14000 Average length of output tokens0.200.250.300.350.400.450.500.55Total avg@16R1-Distill-Qwen Full PoolOpenR1-Qwen Random-2%...
https://arxiv.org/abs/2505.17266v2
presented in Appendix A.3, further underscoring the necessity of our selection method. The difficulty quantifier trained on OpenR1-Math-220k assigns a high score to a competition-level Chinese math problem, and the corresponding reasoning trace is also relatively long, leading the joint ranker to give it a high ranking...
https://arxiv.org/abs/2505.17266v2
preprint arXiv:2504.13835 , 2025. [6] Dao, T. Flashattention-2: Faster attention with better parallelism and work partitioning. arXiv preprint arXiv:2307.08691 , 2023. [7]DeepMind, G. Gemini thinking - use thinking models. https://ai.google. dev/gemini-api/docs/thinking#python , 2025. URL https://ai.google.dev/ gemini-...
https://arxiv.org/abs/2505.17266v2
data selection for instruction tuning. arXiv preprint arXiv:2308.12032 , 2023. [22] Li, M., Zhang, Y ., He, S., Li, Z., Zhao, H., Wang, J., Cheng, N., and Zhou, T. Superfiltering: Weak-to-strong data filtering for fast instruction-tuning. arXiv preprint arXiv:2402.00530 , 2024. [23] Li, X., Zou, H., and Liu, P. Limr: L...
https://arxiv.org/abs/2505.17266v2
SC20: International Conference for High Performance Computing, Networking, Storage and Analysis , pp. 1–16. IEEE, 2020. [39] Rein, D., Hou, B. L., Stickland, A. C., Petty, J., Pang, R. Y ., Dirani, J., Michael, J., and Bowman, S. R. Gpqa: A graduate-level google-proof q&a benchmark. In First Conference on Language Mode...
https://arxiv.org/abs/2505.17266v2
selection for fine-tuning large language models by summarizing training trajectories of small models. Advances in Neural Information Processing Systems , 37:83465–83496, 2024. [55] Ye, Y ., Huang, Z., Xiao, Y ., Chern, E., Xia, S., and Liu, P. Limo: Less is more for reasoning. arXiv preprint arXiv:2502.03387 , 2025. [5...
https://arxiv.org/abs/2505.17266v2
3 \cdot \widehat {FG} $, where the arcs are measured in degrees. Long -CoT Reasoning with Low -Efficiency: <think> Okay, so I need to find the sum of some arcs on the circumcircle of triangle DEF. Let me start by understanding the problem step by ste p. … Alternatively, consider that 84 °+ 60°+ 36°= 180°, but the combi...
https://arxiv.org/abs/2505.17266v2
exact value . Thus, boxed, it's \boxed{336} Figure 10: A case study of efficient exploration in reasoning on AIME 25. The emergence of more rethinking tokens in long-CoT reasoning does not lead to improved efficiency. In contrast, stronger LRMs reach the correct reasoning trace more efficiently. 15 A.2 Diversity of Ins...
https://arxiv.org/abs/2505.17266v2
for Nina to save enough to buy the game ? Response: (Length ofReasoning Trace: 340) <think >嗯,好的,我现在得帮 Nina算算她需要存多少周才能买到那个视频游戏。 Alright, let's calculate how many weeks Nina needs to save to buy that video game. ...接下来,她每周存多少钱。零用钱是 10美元,存一半的话,就是 10除以 2,等于 5美元每周 。她每周存 5美元,总需要的钱是 55美元,所以需 要多少周呢? ...Then, how much does she...
https://arxiv.org/abs/2505.17266v2
arXiv:2505.17267v1 [cs.CL] 22 May 2025GREEK BARBENCH : A Challenging Benchmark for Free-Text Legal Reasoning and Citations Odysseas S. Chlapanis1,2Dimitrios Galanis3Nikolaos Aletras4Ion Androutsopoulos1,2 1Department of Informatics, Athens University of Economics and Business, Greece 2Archimedes, Athena Research Center...
https://arxiv.org/abs/2505.17267v1
ing the LLM-as-a-judge framework (Zheng et al., 2023), is a promising alternative; however, its reli- ability has not been extensively assessed in legal reasoning (Bhambhoria et al., 2024; Li et al., 2025). To address these issues, we present the G REEK - BARBENCH , a benchmark that evaluates the rea- 2https://www.vals...
https://arxiv.org/abs/2505.17267v1
code documents to find the rele- vant chapter and pinpoint the exact statutory article within it to cite in support of their arguments. 2.2 Task Each instance in GREEK BARBENCH is taken from Greek Bar exam papers. The input consists of (1) the case facts, (2) the legal question, and (3) a col- lection of potentially re...
https://arxiv.org/abs/2505.17267v1
et al., 2020) to select the kmost ‘rel- evant’ articles for inclusion in the LLM’s input. However, this approach suffers from three signifi- cant limitations: a) candidate lawyers taking the ex- ams do not have access to such retrieval tools, mak- ing direct comparisons with human performance problematic; b) retrievers...
https://arxiv.org/abs/2505.17267v1
rated on a scale of 1 to 10, and the fi- nal score is the average of these three. This system allows explainability through detection of specific shortcomings in the reasoning abilities of LLMs. The Facts score measures understanding of case facts; the Cited Articles evaluates the accuracy and interpretation of cited l...
https://arxiv.org/abs/2505.17267v1
lower score. We opted not to assign specific point val- ues or ‘costs’ to each important subset, as previous work with rubrics (Starace et al., 2025; Pires et al., 2025), to minimize the annotation burden. The pro- cess involves simply highlighting the three scoring dimensions using different colors and then marking th...
https://arxiv.org/abs/2505.17267v1
7.55 OpenAI-01 7.52 Gemini-2.0-Flash 7.25 GPT-4o 7.14 Pass 6.0 Llama-3.1-70B4.55 0 1 2 3 4 5 6 7 8 910Figure 1: Manual evaluation by legal expert annotators on the semi-private test set of the 2024 exams. paper) are constructed as follows: for each ques- tion in the benchmark, the mock system is assigned either the sco...
https://arxiv.org/abs/2505.17267v1
2011) between the two annotators on the three- dimensional scores was 0.74, and the SPA was 0.85, both indicating a substantial level of inter- annotator agreement (Artstein and Poesio, 2008). For the SPA calculation, we treated one annotator’s scores as ground truth and compared the other an- notator’s scores against ...
https://arxiv.org/abs/2505.17267v1
7.75 8.5 7.6 7.9 7.98 8.3 7.2 7.4 7.63 Gemma-3-27B 7.8 5.5 5.9 6.39 6.7 4.9 4.9 5.51 6.8 5.2 5.6 5.88 8.1 5.9 6.1 6.68 7.8 6.6 6.6 7.01 7.5 5.7 5.8 6.33 L-Krikri-8B 7.0 5.3 5.6 5.95 7.1 5.3 5.1 5.84 6.7 5.3 5.4 5.79 7.9 6.3 6.2 6.78 7.4 6.4 6.4 6.74 7.2 5.7 5.8 6.24 Table 5: Fine-grained comparison of proprietary and s...
https://arxiv.org/abs/2505.17267v1
model capabilities. A key finding is that all models struggle most with the ‘Cited Articles‘ dimension. The higher overall scores of Gemini-2.5-Flash and GPT-4.1 are largely attributable to their stronger performance in the Cited Articles andAnalysis dimensions, when com- pared to Claude-3.7-Sonnet and GPT-4.1-mini. Fu...
https://arxiv.org/abs/2505.17267v1
detailed instructions per question that specify explicitly the attributes that would contribute positively and negatively to the fi- nal score of candidate answers. Constructing from scratch either of these approaches is prohibitively expensive, in contrast to our simple, span-based rubrics that only require minimal an...
https://arxiv.org/abs/2505.17267v1
NLP benchmarks carry significant ethical implications and potential societal impact, particularly concern- ing fairness, access to justice, and responsible au- tomation (Tsarapatsanis and Aletras, 2021). There- fore, careful consideration of their design and po- tential uses is essential. Our research contributes to th...
https://arxiv.org/abs/2505.17267v1
provided by the National In- frastructures for Research and Technology (GR- NET), with support from the EU Recovery and Resilience Facility. References Nikolaos Aletras, Dimitrios Tsarapatsanis, Daniel Preotiuc-Pietro, and Vasileios Lampos. 2016. Pre- dicting judicial decisions of the european court of human rights: a ...
https://arxiv.org/abs/2505.17267v1
Association for Computational Lin- guistics. Ronald Aylmer Fisher. 1935. The Design of Experi- ments . Oliver & Boyd. Markus Freitag, Nitika Mathur, Daniel Deutsch, Chi- Kiu Lo, Eleftherios Avramidis, Ricardo Rei, Brian Thompson, Frederic Blain, Tom Kocmi, Jiayi Wang, David Ifeoluwa Adelani, Marianna Buchicchio, Chryso...
https://arxiv.org/abs/2505.17267v1
2020, page 110–117, New York, NY , USA. Association for Computing Machinery. Klaus Krippendorff. 2011. Computing krippendorff’s alpha-reliability. Departmental Papers (ASC) 43, Annenberg School for Communication, University of Pennsylvania.Satyapriya Krishna, Kalpesh Krishna, Anhad Mo- hananey, Steven Schwarcz, Adam St...
https://arxiv.org/abs/2505.17267v1
Dominican Republic. Associa- tion for Computational Linguistics. Xueqing Peng, Triantafillos Papadopoulos, Efstathia Soufleri, Polydoros Giannouris, Ruoyu Xiang, Yan Wang, Lingfei Qian, Jimin Huang, Qianqian Xie, and Sophia Ananiadou. 2025. Plutus: Benchmarking large language models in low-resource greek finance. Prepr...
https://arxiv.org/abs/2505.17267v1
( Facts ,Cited Articles , andAnalysis ).” For the creation of text spans for Span-Judge (§ 3.2), annotators were instructed to: “Highlight the text-spans that correspond to each scoring dimension ( Facts ,Cited Articles , and Analysis ). Highlight the most important subsets of these spans with the label important .” B ...
https://arxiv.org/abs/2505.17267v1
conclusion or omits some critical argument, points should be deducted. Use plain text, without markdown. Your answer should follow the template shown below, where X, Y, Z are integers (1-10): Explanation of the Facts Score: <your explanation for the score ...>, Facts Score: X Explanation of the Legislation Score: <...>...
https://arxiv.org/abs/2505.17267v1
Score: Y Explanation of the Analysis Score: <...>, Analysis Score: Z Figure 6: System prompt given to Span-Judge LLM-judges. C Complete Dataset Example In this section we present the complete version of the example that we presented in Table 1. We show the complete Facts andQuestion (Fig. 7), the Relevant Legal Context...
https://arxiv.org/abs/2505.17267v1
English), as given in to the candidate LLMs, for the example in Table 1. Relevant Legislation: Civil Code (AK) CHAPTER FOUR - LIABILITY FROM CONTRACTS IN GENERAL Articles 361 – 373 CHAPTER EIGHTEENTH - EMPLOYMENT CONTRACT Articles 648 – 680 CHAPTER THIRTY-NINTH – TORTS Articles 914 – 938 Code of Civil Procedure (ΚΠολΔ)...
https://arxiv.org/abs/2505.17267v1
και σαφώς διακριτή ένδειξη για το περιεχόμενο του ή έστω να επιστήσει την προσοχή της Π στο επικίνδυνο υγρό συνιστά αφενός, πλημμελή εκτέλεση υποχρεώσεων από τη σύμβαση και αφετέρου, αδικοπραξία κατά την 914 ΑΚ της οποίας το παράνομο στηρίζεται στην παράβαση της γενικής υποχρέωσης πρόνοιας, ασφάλειας και προστασίας που...
https://arxiv.org/abs/2505.17267v1
to A’s skin (an unlawful and culpable act). Therefore, P is liable according to the provision of Article 914 AK. According to the provision of Article 922 AK, the principal or the person who supervises another in the performance of a service is liable for the damage that the servant or agent unlawfully caused to a thir...
https://arxiv.org/abs/2505.17267v1
agent assistant (facts 3, 6). At the same time, both P and I are jointly liable under tort law, since P caused unlawful and culpable bodily harm to A (fact 5) by applying pure acetic acid (fact 6), according to Article 914 of the Civil Code (AK). I is also liable as principal for the unlawful act of his agent P, which ...
https://arxiv.org/abs/2505.17267v1
Zebra-Llama: Towards Extremely Efficient Hybrid Models Mingyu Yang∗, Mehdi Rezagholizadeh∗, Guihong Li∗, Vikram Appia, Emad Barsoum Advanced Micro Devices, Inc. (AMD) {mingyu.yang,mehdi.rezagholizadeh,guihong.li}@amd.com Abstract With the growing demand for deploying large language models (LLMs) across diverse applicat...
https://arxiv.org/abs/2505.17272v1
archi- tectures typically integrate efficient state-space models [ 1] or linear attention [ 2] with full attention mechanisms, leveraging the strengths of both. However, many recent hybrid approaches, including Samba [ 3] and Hymba [ 4], require extensive pre-training from scratch, which is computationally expensive. O...
https://arxiv.org/abs/2505.17272v1
their training cost remains high, limiting accessibility and sustainability. In contrast, post-training approaches insert efficient modules into pre-trained Transformers, often leveraging knowledge distillation to transfer capabilities without full re-training, including MambaInLLaMA [ 5], MOHAWK [ 10], and Llamba [ 11...
https://arxiv.org/abs/2505.17272v1
compress standard attention process to reduce KV cache requirements while maintain- ing high performance. Yet, excessive compression can lead to noticeable performance drops [ 12]. Our hybrid architecture interleaves Mamba2 and MLA layers to set a balance between minimal memory usage and strong predictive performance. ...
https://arxiv.org/abs/2505.17272v1
kv. The shared RoPE key projection WKRis initialized from the average WKacross heads. We choose a constant rank rq,rkvacross all layers. Non-attention parameters such as the feedforward network and output projection WOare directly copied from the pre-trained model. Additional details of MLA initialization are provided ...
https://arxiv.org/abs/2505.17272v1
which leverages em- pirical sensitivity analysis to guide the layer as- signment. To measure the sensitivity of each layer, we begin with the full Mamba2 model after ILD. First, we compute the KL divergence between the full attention-based teacher model and the student model where all layers are Mamba2. Then, for each ...
https://arxiv.org/abs/2505.17272v1
t=1KL[p(·|y1:t, x, θ T)||p(·|y1:t, x, θ)], (13) where θandθTare the parameters of the student model and the teacher model respectively. Such distillation step is crucial for transferring the rich, pre-trained knowledge from the teacher model. Direct Preference Optimization (DPO) In the final training stage, we perform ...
https://arxiv.org/abs/2505.17272v1
71.11 44.21 43.8 77.37 42.11 65.43 58.55 Llama3.1-8B-Inst - 15T 8.03B 100% 54.86 79.55 79.23 68.13 43 80.9 44.69 73.88 65.53 MambaInLlama-8B-50% 70B 20B 8.3B 50% 59.73 84.81 79.69 59.74 44 80.03 46.12 74.11 66.03 Minitron-8B 15B†94B 8.3B 66.67% 52.73 79.5 77.4 62.95 45.2 81.39 39.71 72.69 63.95 X-EcoMLA-8B ( rkv= 128 )...
https://arxiv.org/abs/2505.17272v1
only 7–11B tokens—representing a 214×–500× reduction in training data. Few-shot Results In Table 2, we report the results of few-shot evaluations on the Zebra-Llama-8B models under 25-shot ARC-Challenge (ARC), 10-shot HellaSwag (HS), 5-shot Winogrande (WG), 5-shot MMLU (MM), and 0-shot mc2 for Truthful-QA (TQ) tasks. A...
https://arxiv.org/abs/2505.17272v1
ers, ILD is crucial for aligning their outputs with the original models due to architectural differ- ences from attention layers, providing the pri- mary performance uplift. As for MLA layers, structured initialization can boost the accuracy significantly, which offers a strong foundation further refined by ILD. 8 4.3....
https://arxiv.org/abs/2505.17272v1
the "capacity gap" phenomenon in knowledge distillation, where a smaller student model struggles to fully absorb and generalize the complex teacher’s representations when the teacher model far exceeds student mimicry capabilities [ 29,30]. Therefore, it’s vital to select a teacher model that is sufficiently powerful to...
https://arxiv.org/abs/2505.17272v1
future work. References [1]Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752 , 2023. [2]Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In Inte...
https://arxiv.org/abs/2505.17272v1
Wang. Llama3 ultrafeedback-armorm dataset. https://huggingface.co/ datasets/JunxiongWang/llama3-ultrafeedback-armorm , 2024. [19] Wing Lian, Bleys Goodson, Eugene Pentland, Austin Cook, Chanvichet V ong, and "Teknium". Openorca: An open dataset of gpt augmented flan reasoning traces. https://https: //huggingface.co/Ope...
https://arxiv.org/abs/2505.17272v1
outlined in X-EcoMLA [ 12] for Multi-Head Attention (MHA). However, for Generalized Question Answering (GQA) models like the Llama 3 series, our approach diverges slightly by keeping the number of key/value heads from the base model for MLA while X-EcoMLA forces the number of key/value heads to be the same as the numbe...
https://arxiv.org/abs/2505.17272v1
the average key projection matrix WK avg∈Rd×dhis calculated for all attention heads. Then, the final dr columns are extracted for initializing WKR, formulated as follows: WKR=WK avg[:,−dr:]. (18) The detailed initialization algorithm can be found in Algorithm 1. A.2 Structured Mamba2 Initialization The structured initi...
https://arxiv.org/abs/2505.17272v1
Leaderboard. For zero- shot evaluation, we report performance across a broad suite of language understanding tasks: MMLU, HellaSwag, PIQA, ARC-Easy, ARC-Challenge, Winogrande, OpenBookQA, and RACE. Evaluations are performed using the command-line interface with ROCm-enabled devices and a batch size of 16. For few-shot ...
https://arxiv.org/abs/2505.17272v1
30.2/41.6 72.91/73.29 38.56 61.33 Zebra-Llama, 14MLA-14M2 9B 3.27B 50/52.65 80.47/76.35 53.52/72.43 51.97 31.8/44.4 76.61/76.99 46.99 67.8 Zebra-Llama, 16MLA-16M2 11B 8.19B 57.17/58.96 83.59/79.92 57.82/77.73 57.18 35.20/44.6 79.65/80.2 48.71 72.38 Table 8: Comparing our Zebra-Llama with state-of-the-art hybrid models ...
https://arxiv.org/abs/2505.17272v1
with 192GB of memory, using the gen- eration function from the mamba_ssm library. Our Zebra-Llama models demonstrate significant throughput gains compared to Llama, pure MLA models, and hybrid GQA-Mamba models. Although pure Mamba models achieve faster inference speeds than Zebra-Llama, they tend to exhibit poorer over...
https://arxiv.org/abs/2505.17272v1
arXiv:2505.17281v1 [cs.CL] 22 May 2025Search Wisely: Mitigating Sub-optimal Agentic Searches By Reducing Uncertainty Peilin Wu1∗, Mian Zhang1∗, Xinlu Zhang2, Xinya Du1, Zhiyu Zoey Chen1 1Department of Computer Science, The University of Texas at Dallas, 2Department of Computer Science, University of California, Santa B...
https://arxiv.org/abs/2505.17281v1
the model and a confidence threshold is incorporated into the reward function, only encouraging gener- ations with high-certainty search calls leading to correct answer. Through extensive experiments on seven QA benchmarks, we show that β-GRPO enables a 3B model with better agentic RAG abil- ity compared to strong base...
https://arxiv.org/abs/2505.17281v1
Searcher, this error rate was particularly high with fewer total searches (over 72% if no searches were made). For Search-R1, errors in non-search steps remained notable even when performing many searches overall (e.g., 48.70% for 4-search prob- lems), possibly due to decision complexity in later stages. (See Figure 2 ...
https://arxiv.org/abs/2505.17281v1
use an off-the-shelf search tool, and, if so, to generate a search query within <search></search> tags.The search tool then returns relevant documents in- side<information></information> tags. Once obtaining new information, the policy model can either continue searching for addi- tional information or provide a final ...
https://arxiv.org/abs/2505.17281v1
America Esporte Clube in? Gener- ation : <think> The question asks for the country hosting Sul America Esporte Clube, a team in the brazilian C1 and C2 league, thus the direct reasoning is likely to be Brazilian football team residing in Brazil.Question : In what Country is Sul America Esporte Clube in? Gen- eration : ...
https://arxiv.org/abs/2505.17281v1
confidence-aware policy gradient method, we enable a 3B model with better agentic RAG ability than strong baselines. 7 Limitations We formally define and quantify sub-optimal search behaviors in agentic RAG systems and pro- poseβ-GRPO to train agentic RAG models with improved self-knowledge awareness. However, we ackno...
https://arxiv.org/abs/2505.17281v1
Xie, Xingchao Liu, Xinyu Yang, Xinyuan Li, Xuecheng Su, Xuheng Lin, X Q Li, Xiangyue Jin, Xiaojin Shen, Xiaosha Chen, Xiaowen Sun, Xiaoxi- ang Wang, Xinnan Song, Xinyi Zhou, Xianzu Wang, Xinxia Shan, Y K Li, Y Q Wang, Y X Wei, Yang Zhang, Yanhong Xu, Yao Li, Yao Zhao, Yaofeng Sun, Yaohui Wang, Yi Yu, Yichao Zhang, Yifa...
https://arxiv.org/abs/2505.17281v1
large reasoning models. arXiv [cs.AI] . Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. 2023. When not to trust language models: Investigating effectiveness of parametric and non-parametric mem- ories. In Proceedings of the 61st Annual Meeting of the Association for Comput...
https://arxiv.org/abs/2505.17281v1
Kai Hayashi, Karan Singhal, Katy Shi, Kavin Karthik, Kayla Wood, Kendra Rimbach, Kenny Hsu, Kenny Nguyen, Keren Gu-Lemberg, Kevin Button, Kevin Liu, Kiel Howe, Krithika Muthukumar, Kyle Luther, Lama Ahmad, Larry Kai, Lauren Itow, Lau- ren Workman, Leher Pathak, Leo Chen, Li Jing, Lia Guy, Liam Fedus, Liang Zhou, Lien M...
https://arxiv.org/abs/2505.17281v1
Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin, Kai Dang, Keming Lu, Keqin Bao, Kexin Yang, Le Yu, Mei Li, Mingfeng Xue, Pei Zhang, Qin Zhu, Rui Men, Runji Lin, Tianhao Li, Ti...
https://arxiv.org/abs/2505.17281v1
search sub- query qtand the retrieved context ct=search (qt). The sub-answer atfor this step sR tis typically de- rived using ctand reflected in rt+1. If the model does not retrieve, the non-retrieval step sNR t= (rt) relies on the existing context {s1, s2, . . . , s t−1} and the model’s internal knowledge Mto derive a...
https://arxiv.org/abs/2505.17281v1
high quality. The reference answer obtained is com- pared with the actual answer generated by the agent for that non-search step. The under- search rate is calculated as the proportion of non-search steps where the agent’s answer does not match (determined by QwQ-32B in our analysis) the reference answer, quantify- ing...
https://arxiv.org/abs/2505.17281v1
arXiv:2505.17282v1 [cs.LG] 22 May 2025Attention with Trained Embeddings Provably Selects Important Tokens Diyuan Wu1,∗Aleksandr Shevchenko2,∗Samet Oymak3Marco Mondelli1 Abstract Token embeddings play a crucial role in language modeling but, despite this practical relevance, their theoretical understanding remains limit...
https://arxiv.org/abs/2505.17282v1
is given by f(X;p,E) =Softmax (p⊤E⊤ X)EXv=PT i=1exp p⊤Exi E⊤ xiv PT j=1exp p⊤Exj, (1) whereEX= [Ex1, . . . , E xT]⊤contains the embeddings of the input X,pis the embedding of the ⟨cls⟩token and vis the final regression vector. Our main results are summarized below: ∗Equal contribution. 1Institute of Science and Tec...
https://arxiv.org/abs/2505.17282v1
clustering behavior in transformer representations that emerges after successive applications of the attention block. Under a random feature design, it is shown in [ BM24] that softmax attention exhibits a sensitivity property which allows for a sharp change in attention scores given the perturbation of a single token....
https://arxiv.org/abs/2505.17282v1
an average of the signed frequency of s, where the sign comes from the label of the sequences in which the token appears. Definition 3.1 (Positive, negative and irrelevant tokens) .We say that a token sis(i) positive ifαs>0,(ii) negative ifαs<0, and(iii) irrelevant ifαs= 0. Moreover, we say that a token siscompletely p...
https://arxiv.org/abs/2505.17282v1
of gradient descent. However, (6)also implies that the overlap between the ⟨cls⟩embedding vector p andEsdoes not improve after the first step. Thus, next, we study the training dynamics of p, characterizing its implicit bias. Specifically, we fix the context embedding matrix to E1(obtained after the first gradient step...
https://arxiv.org/abs/2505.17282v1
further denote by Scthe set containing all completely positive and all completely negative tokens. Theorem 4.3. Under Assumption 1, for any δ >0,let η0≥4n2T2, d≥max( 256, 2 log|S|2 δ2 ,(88η2 0+ 111 η0+ 2)8,|S|+ 3) . (13) Letptbe the solution of the gradient flow (9). Then, with probability at least 1−δ, we have that ...
https://arxiv.org/abs/2505.17282v1
under an additional assumption, no irrelevant token is selected (Lemma 4.5). Lemma 4.4. Suppose ˆpselects all the tokens, i.e., SX(ˆp) =S. Then, p∞̸= ˆp. Proof.Ifˆpselects all the tokens, then ˆp⊤Exi=ˆp⊤Exjfor all xi, xj∈Xand for all X∈ Xn. Thus, by Lemma A.2, ˆp⊤∇pL(E, p) = 0for any p, which gives the desired result. ...
https://arxiv.org/abs/2505.17282v1
dot-product with pis proportional to the modulus of such frequency. We detail below the experimental design. Synthetic data. Let us define the data-generating process for the synthetic experiments in Figure 2. The data is generated according to a K-level model. Namely, the vocabulary set Sis partitioned as S=˜S ∪ S−1 ...
https://arxiv.org/abs/2505.17282v1
two-layer model: E′ X= LayerNorm( Softmax (EXE⊤ X)EX+EX), f(X;p,E) =Softmax (p⊤(E′ X)⊤)E′ Xv, (17) 1https://www.kaggle.com/datasets/lakshmi25npathi/imdb-dataset-of-50k-movie-reviews 2https://www.kaggle.com/datasets/yelp-dataset/yelp-dataset 3https://huggingface.co/google-bert/bert-base-uncased 8 which includes both a s...
https://arxiv.org/abs/2505.17282v1
funded by the European Union (ERC, INF2, project number 101161364). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held respons...
https://arxiv.org/abs/2505.17282v1
Effrosyni Kokiopoulou. Three towers: Flexible contrastive learning with pretrained image models. NeurIPS , 2023. [LHI+24]Yingcong Li, Yixiao Huang, Muhammed E Ildiz, Ankit Singh Rawat, and Samet Oymak. Mechanics of next token prediction with self-attention. International Conference on Artificial Intelligence and Statis...
https://arxiv.org/abs/2505.17282v1
and Haim Sompolinsky. Dissecting the interplay of attention paths in a statistical mechanics theory of transformers. NeurIPS , 2024. [TWCD23] Yuandong Tian, Yiping Wang, Beidi Chen, and Simon Shaolei Du. Scan and snap: Understanding training dynamics and token composition in 1-layer transformer. NeurIPS , 2023. [VBC20]...
https://arxiv.org/abs/2505.17282v1
Lemma A.2. For any vector bp,we have −bp⊤∇pL(E, p) =bE g(X, y) TX i=1X j>i(bai(X)−baj(X))qi(X)qj(X)(γi(X, y)−γj(X, y))  , wherebai=bp⊤Exifor all i∈ {1, . . . , T }. Proof.From Lemma A.1, we have ∇pL(E, p) =−bE yg(X, y) TX i=1 X j̸=iqi(X)qj(X)(Exi−Exj) E⊤ xiv   =−bE g(X, y) TX i=1 X j̸=iqi(X)qj...
https://arxiv.org/abs/2505.17282v1
256, 2 log|S|2 δ2 ,(88η2 0+ 111 η0+ 2)8) , then with probability at least 1−δ, L(E1, p1)≤bE" log 1 + exp −1 TTX i=1η0 2yαxi+1 22η0!!# . Proof.We first lower bound yf(X;p,E)for each pair X, y.After the first step, we have max s,s′|(p1)⊤(E1 s−E1 s′)|= max s,s′ (p0)⊤(E0 s−E0 s′) +η0 2(αs−αs′)(p0)⊤v +err⊤ p(E1 s−E1 s′) +...
https://arxiv.org/abs/2505.17282v1
is unique. Indeed, assume by contradiction that p1, p2 are two different solutions of (12). Clearly, p1andp2have the same norm, sop⊤ 1p2 ∥p1∥2∥p2∥2̸= 1.Then, any convex combination of p1, p2gives a feasible solution with a strictly smaller norm, which is a contradiction. Next, we show that (12) is always feasible. To s...
https://arxiv.org/abs/2505.17282v1
at least 1−δ, ifp∞= lim t→∞pt ∥pt∥2exists, then p∞satisfies sX ∗∈ SX(p∞),for all X∈ Xn, where sX ∗denotes the unique completely positive/negative token in the sequence X. Proof.We prove the lemma by contradiction. W.l.o.g., assume by contradiction that there exists X∈ Xncointaining the important token x1s.t.x1/∈ SX(p∞)...
https://arxiv.org/abs/2505.17282v1
Letpbe a unit-norm vector and p=Rpfor some positive constant R.Suppose pis a locally optimal direction as defined in Definition C.4 with some µthat does not depends on R.Moreover, suppose there exists a constant τ1that may depend on p, η0, n, T, dbut not on R,such that: min X{p⊤(Es−Es′),∀s∈ SX(p),∀s′∈ S2 X(p)} ≥τ1, min...
https://arxiv.org/abs/2505.17282v1
rest of the proof, we fix any ϵ >0and denote R=∥pt∥2. We define pt=pt∥bp∥2 ∥pt∥2,and we equivalently show that: −bp⊤∇pL(E1, pt)≥ −(1−ϵ)pt∇pL(E1, pt). (34) 24 To prove this, we first note that since p∞/∈ P∗(p∞),for allbp ∥bp∥2∈ P∗(p∞),there exists τ0independent of Rsuch that ∥bp−p∞∥bp∥2∥2≥τ0. Thus, by the definition of ...
https://arxiv.org/abs/2505.17282v1
X(pt), j′∈ S2 X(pt),and recall that: X i∈SX(pt)(ai(X)−aj(X))hi,j(X, y, p t) =g(X, y)(ai0(X)−aj(X))qi0(X)qj(X)X i∈SX(pt)(γi(X, y)−γj(X, y)), X i∈SX′(pt)(ai(X′)−aj′(X′))hi,j′(X′, y′, pt) =g(X′, y′)(ai1(X′)−aj′(X′))qi1(X′)qj′(X′)X i∈SX′(pt)(γi(X′, y′)−γj′(X′, y′)), 26 for any i0∈ SX(pt), i1∈ SX′(pt). Note that g(X′, y′) g...
https://arxiv.org/abs/2505.17282v1
We note that: (1 +ϵ2)bE g(X, y)X j∈S2 X(pt)(aiX∗(X)−aj(X)qiX∗(X)qj(X)(γiX∗(X)−γj(X)))  <(1−µ)bE g(X, y)X j∈S2 X(pt)(daiX ∗(X)−baj(X))qiX ∗(X)qj(X)(γiX ∗(X)−γj(X))) , as daiX∗(X)−baj(X) = 1 , aiX∗(X)−aj(X)≤1−µ−ϵ1. It remains to show that µbE g(X, y)X j∈S2 X(pt)(daiX∗(X)−baj(X))qiX∗(X)qj(X)(γiX∗(X)−γj(X)))  ≥...
https://arxiv.org/abs/2505.17282v1
SELF: Self-Extend the Context Length With Logistic Growth Function Phat Thanh Dang*1Saahil Thoppay∗1Wang Yang1Qifan Wang2 Vipin Chaudhary1Xiaotian Han1 1Case Western Reserve University2Meta {ptd18,svt21,wxy320,vxc204,xhan}@case.edu wqfcr@meta.com Abstract Large language models suffer issues when op- erated on long cont...
https://arxiv.org/abs/2505.17296v1
consecutive tokens into fixed-size chunks, combined with a neighbor window for nearby tokens. While LongLM’s method shows promising re- sults on long-context tasks, we propose a more adaptive strategy grounded in the observation that, in natural language, the relevance of a token typ- ically decreases with its distance...
https://arxiv.org/abs/2505.17296v1
the current token, the less important it tends to be to the current context. In LongLM (Jin et al., 2024a), the group size is the same for every group, which is not the most optimized way. Intuitively, in natural languages, the further a token, the less relevant the token is to the context, allowing us to group them in...
https://arxiv.org/abs/2505.17296v1
hidden dimension of each head. fq(xm, m) = Wqxmeimθ, fk(xn, n) = Wkxneinθ, θd=b−2d/|D|. The positional embed- ding system keeps the real section of qTkwhich isRe(q∗k). The dot product of the query and key will always yield a result depending on the relative distance between the two tokens as follows: ⟨fq(xm, m), fk(xn,...
https://arxiv.org/abs/2505.17296v1
- W+ 2 … i -1 i i+11 … n - W - 2 n - W -1 n - W … n - 2 n -1 n Figure 3: Illustration of the relation between GKand GQknowing that the relative position right after the neighbor window has to be W. of the neighbor window, because the relative posi- tions inside the neighbor window will range from 0 toW−1(see illustrati...
https://arxiv.org/abs/2505.17296v1
pseudo-code. 4 Figure 4: Illustration of the algorithm grouping the indices using the function f:N→N, where f(0) = 1 , f(1) = 2, f(2) = 2 , f(3) = 3 andf(4) = 3 . The sequence with length of n= 11 was run the model with the pretraining sequence length of L= 6. The numbers denote the relative position between the corres...
https://arxiv.org/abs/2505.17296v1
original context length, the scores are basically the same for SE and SELF. When the sequence is significantly long, the amount of intermediate group is negligible compared to the number of groups that have reached the maximum group size. As a result, the model behavior closely resembles that of SE, where all groups ha...
https://arxiv.org/abs/2505.17296v1
two grouping methods has the same neighbor window size W= 1024 . window is also confirmed since SELF performs bet- ter in tasks where the average context length is not significantly long such as MultiFieldQA, 2Wiki- MultihopQA, HotpotQA and TREC. We can also observe the trend in trade off of accuracy in 2WikiMultihopQA...
https://arxiv.org/abs/2505.17296v1
77.8 21.2 3.0 6.0 44.1 28.8 ChatGLM2-6B-32k* 21.1 31.5 46.2 45.1 34.0 21.9 32.4 24.0 26.5 62.5 78.7 36.3 1.5 77.0 55.6 49.9 ChatGLM3-6B-32k* 26.0 43.3 51.7 54.4 44.9 40.4 36.8 23.9 27.9 79.0 87.1 38.2 2.0 99.0 57.66 54.76 Baichuan-13B-4k* 0.07 17.55 17.28 3.29 15 0.1 6.8 1.71 23.1 20.05 20.06 5.77 0.06 0.5 47.98 16.58 ...
https://arxiv.org/abs/2505.17296v1
not solve the problem of attention having a minimal affect at large relative distances. To solve this problem, other extension methods use a similar system where the position encod- ings modify the relative positions. Models with 7 Table 3: Performance comparison of Llama2-7B, Llama2-13B, Qwen-7B and DeepSeek-R1-Distil...
https://arxiv.org/abs/2505.17296v1
modifying the prompt. 5With the exception of CodeU, a test where all methods performed poorly 8 Limitations •Although theoretically, SE and SELF has the basically same runtime complexity, SELF re- quires more complicated computations like ln instead of just FLOOR . As a result, running SELF takes a longer time than run...
https://arxiv.org/abs/2505.17296v1
2019. Transformer-xl: Attentive language models beyond a fixed-length context. Preprint , arXiv:1901.02860. DeepSeek-AI, Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, Xiaokang Zhang, Xingkai Yu, Yu Wu, Z. F. Wu, Zhibin Gou, Zhi- hong Shao, Zhuoshu...
https://arxiv.org/abs/2505.17296v1
Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, JérémyRapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafiori, Wenhan Xiong, Alexandre Défossez, and 7 others. 2024. Code llama: Open foundation models for code. Preprint , a...
https://arxiv.org/abs/2505.17296v1
, arXiv:2407.10671. An Yang, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoyan Huang, Jiandong Jiang, Jianhong Tu, Jianwei Zhang, Jingren Zhou, Junyang Lin, Kai Dang, Kexin Yang, Le Yu, Mei Li, Minmin Sun, Qin Zhu, Rui Men, Tao He, and 9 others. 2025b. Qwen2.5-1m technical report. arXiv preprint arXiv:2501.15383 ...
https://arxiv.org/abs/2505.17296v1
arXiv:2505.17306v1 [cs.CL] 22 May 2025Refusal Direction is Universal Across Safety-Aligned Languages Xinpeng Wang∗1,2, Mingyang Wang∗1,2,3, Yihong Liu∗1,2, Hinrich Schütze1,2, Barbara Plank1,2 1LMU Munich2Munich Center for Machine Learning3Bosch BCAI {xinpeng, mingyang, yihong, bplank} @cis.lmu.de Abstract Refusal mech...
https://arxiv.org/abs/2505.17306v1
core pragmatic function present in all human languages, although its surface form may vary across linguistic and cultural contexts [Brown, 1987, Beebe et al., 1990]. Prior work suggests that LLMs often share internal representations across languages [Artetxe et al., 2020, Wei et al., 2021, Hua et al., 2024, Brinkmann e...
https://arxiv.org/abs/2505.17306v1
natural language processing (NLP) is to develop language-agnostic representations that enable generalization across linguistic boundaries – commonly referred to as cross-lingual transfer [Libovický et al., 2020, Wei et al., 2021, Chang et al., 2022]. Early research primarily focuses on aligning static word embeddings u...
https://arxiv.org/abs/2505.17306v1