Research map / Large language models / Instruction and fine-tuning
Order-Independence Without Fine Tuning
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes Set-Based Prompting, an inference-time change to attention mask and positional encoding that makes parallel sub-sequences (e.g., MCQ options) order-independent for pretrained transformer LLMs without fine-tuning.
Problem
LLM outputs change significantly when semantically identical sub-sequences (such as multiple-choice options or documents) are reordered, causing order dependency that harms reliability and comparability of benchmark results.
Approach
Remove ordering information between a specified set of sub-sequences by using a non-triangular attention mask (tokens see only their own sub-sequence, shared prefix, and label-free tokens) together with positional indices reset at the start of each sub-sequence, provably making outputs invariant to sub-sequence permutations, applied drop-in at inference time with no training.
Key results
- Set-Based Prompting yields identical outputs under all option orderings; for most models its accuracy falls within the range spanned by normal vs reversed ordering on CSQA and MMLU (exception: Llama 3 8B Instruct).
- On MMLU, for all Llama 2 models Set-Based Prompting lies above or within the interquartile range of 24 permutations; Llama 3 is as bad as the worst ordering but still within range.
- Llama 2 7B summarized a 6,018-token Wikipedia article when its sections were fed in parallel, whereas sequential input produced degenerate repeated text.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Apply Set-Based Prompting to the answer options | LLMs on modified CSQA · modified CSQA | accuracy | Mixed |
| Apply Set-Based Prompting to the answer options | Llama 2 models · MMLU | accuracy | No clear effect |
| Apply Set-Based Prompting to the answer options | Llama 3 models · MMLU | accuracy | Mixed |
| Modify only the attention mask (ablation) | Set-Based Prompting · MMLU, first 20 question sets | accuracy variation across normal and reversed option orders | Helped |
| Modify only the positional encoding (ablation) | Set-Based Prompting · MMLU, first 20 question sets | accuracy variation across normal and reversed option orders | Mixed |
| Add option numbers to the inputs (ablation) | Set-Based Prompting · MMLU, first 20 questions | accuracy | Helped |
| Add a chain-of-thought prompt (ablation) | Set-Based Prompting and order-dependent prompting · MMLU, first 20 question sets | accuracy | Helped |
| Apply Set-Based Prompting to the in-context examples | LLMs on Financial Phrase Bank sentiment classification · Financial Phrase Bank | accuracy | Helped |
| Process documents in parallel rather than sequentially | LLMs on long-context information retrieval · 10-document information retrieval | retrieval accuracy | Mixed |
| Process the input as parallel subsequences | Llama 2 7B · 6,018-token document summarization | summary coherence | Helped |
Surprising findings
- Modifying only the attention mask reduces order variation more than modifying only the positional encoding, though the effect varies by model.
- Adding enumerated option numbers improved accuracy across orderings, but this reintroduces order information and removes the invariance guarantee.
Limitations
- Out-of-distribution activations lower accuracy relative to the unmodified model, especially for some models (e.g., Llama 3 8B Instruct), and no fine-tuning was used to adapt models to the method.
- Evaluated only single parallel sub-sequence per prompt and four model families; each family needs custom inference code.
- Results on MMLU/CSQA use a modified prompt format (quoted options) and a 1-shot setup, so absolute accuracies differ from standard benchmarks; 70B models not tested.
Experimental setup
Datasets: CommonsenseQA MMLU Financial Phrase Bank Long-context retrieval (Liu et al. setup)
Benchmarks: CommonsenseQA MMLU Financial Phrase Bank sentiment ICL long-context document retrieval
Metrics: accuracy worst-of-2 accuracy best-of-2 accuracy accuracy distribution across all 24 MMLU permutations
Baselines: unmodified model with normal ordering unmodified model with reversed ordering partial implementations (attention mask only, positional encoding only)
Builds on: transformer self-attention rotary positional embeddings absolute positional embeddings
Closest papers by meaning
- Set-LLM: A Permutation-Invariant LLM (NeurIPS 2025 · similarity 0.90)
- Large Language Diffusion Models (NeurIPS 2025 · similarity 0.87)
- Guaranteed Generation from Large Language Models (ICLR 2025 · similarity 0.87)
- Beyond Autoregression: Fast LLMs via Self-Distillation Through Time (ICLR 2025 · similarity 0.87)
- The Flexibility Trap: Rethinking the Value of Arbitrary Order in Diffusion Language Models (ICML 2026 · similarity 0.86)
- Large language models suffer from a curse of ambiguity (NeurIPS 2026 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
