{
  "id": 1509,
  "kind": "paper",
  "title": "Library of Layers (LoL): Adaptively Ordering Transformer Layers at Runtime",
  "summary": "Every production transformer executes its layers in one fixed order; programs, by contrast, chain the same primitives (conditionals, loops) in different orders per algorithm. Library of Layers (LoL) gives the model a single global library of transformer blocks plus a router that dynamically ORDERS them at inference time for the problem at hand. The architecture has essentially one hyperparameter - the library size - which sweeps a continuum: a small library forces heavy block reuse (depth recurrence / looping), a large library with a subset active per step behaves like sparsity (MoE), and the endpoints recover dense and depth-recurrent designs, so the authors frame LoL as one family generalizing the parameter-efficiency and FLOPs-efficiency trade-offs of all three. Results are parity results, not wins: pretrained on text (FineWeb), LoL is competitive with dense, depth-recurrent, and MoE baselines - main experiments at 360M parameters (GPT-2-Medium shape modernized with RoPE, RMSNorm, SwiGLU, bias-free attention; a 1B variant follows the Llama-3.2-1B shape), and on lm-evaluation-harness benchmarks (ARC-Easy/Challenge, HellaSwag, PIQA, GSM8K) all models sit within 2 standard errors of each other, except the vanilla full-attention model scoring notably lower on ARC-Easy. The distinctive evidence is behavioral: on synthetic sudoku and maze tasks the model uses DISTINCT layer orderings to implement different solution strategies, and the routing can be intervened on to force a chosen strategy onto a given problem instance - the ordering is a controllable computational graph, not just a learned permutation. In a multilingual setting the chosen order patterns differ systematically by language and script. And when LoL is trained on safety data, simple probes fitted to the ROUTER's outputs distinguish safe from unsafe text with high AUROC (the exact figure was not extractable from the HTML full text at catalog time) - the routing decisions themselves carry a readable signal about the input. Caveats: 360M-1B scale throughout; headline text results are parity within noise rather than improvements; the strategy evidence is on synthetic toy tasks, not natural reasoning; runtime reordering costs and behavior at frontier scale are untested. In the catalog's looped-models cluster, LoL is the generalization at the end of the line: a fixed loop is LoL with a one-block library and a hard-coded cyclic order, and MoE is the same routing idea applied across width instead of depth order - LoL routes over both WHICH blocks and IN WHAT SEQUENCE. The intervenable routing and probe-able router state are also the monitoring angle: layer-order choices are an observable, steerable intermediate that fixed-order models do not expose.",
  "body": "",
  "notes": "arXiv 2611.03526 (cs.LG/cs.AI/cs.CL), submitted 2 Nov 2026, 32 pages, 22 figures; license is the arXiv default nonexclusive distribution license (no CC icon on the arXiv page). DOI 10.48550/arXiv.2611.03526. Shared 2026-11-03 via a bare t.co link resolving to the paper's arXivBangers page ('Certified Banger', editorial score 82/100). Research combines the arXiv abstract and the arXivBangers full-text summary; the safety-probe AUROC is reported qualitatively in the paper and its exact value was not extractable from the HTML rendering.",
  "url": "https://arxiv.org/abs/2611.03526",
  "links": [],
  "authors": [
    "Abdellah Rahmani",
    "Sean McLeish",
    "Ang Li",
    "Sanae Lotfi",
    "Pascal Frossard",
    "Micah Goldblum"
  ],
  "tags": [],
  "topics": "",
  "venue": "arXiv preprint",
  "publisher": "",
  "source": "arxiv",
  "language": "en",
  "access": "free",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-11-03T00:00:00.000Z",
  "verified_at": "2026-11-03T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "legacy_paper_id": "1808"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-11-03T19:59:22.195Z",
  "updated_at": "2026-11-03T19:59:22.195Z",
  "page": "https://papers.projxon.ai/entries/1509",
  "markdown": "https://papers.projxon.ai/entries/1509.md",
  "api": "https://papers.projxon.ai/api/entries/1509",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 446,
      "kind": "paper",
      "title": "Is One Layer Enough? Training A Single Transformer Layer Can Match Full-Parameter RL Training",
      "summary": "Systematic layer-wise study of how reinforcement-learning post-training of large language models distributes its gains across transformer layers. Against the usual assumption that every layer should be updated uniformly, the authors find that training a single transformer layer recovers most of the improvement achieved by full-parameter RL training and in some cases surpasses it. They introduce \"layer contribution\", the fraction of full RL improvement recovered by training one layer in isolation, and measure it across seven models spanning two families (Qwen3, Qwen2.5), three RL algorithms (GRPO, GiGPO, Dr. GRPO) and task domains including mathematical reasoning, code generation and agentic decision-making. RL gains concentrate in a small subset of layers, and a consistent structural pattern emerges: high-contribution layers sit in the middle of the stack while layers near the input and output ends contribute substantially less. The resulting layer rankings stay strongly correlated across datasets, tasks, model families and RL algorithms.",
      "url": "https://arxiv.org/abs/2607.01232",
      "authors": [
        "Zijian Zhang",
        "Rizhen Hu",
        "Athanasios Glentis",
        "Dawei Li",
        "Chung-Yiu Yau",
        "Hongzhou Lin",
        "Mingyi Hong"
      ],
      "tags": [],
      "venue": "arXiv",
      "source": "arxiv",
      "license": "arXiv (open); CC BY-NC-ND",
      "published_year": 2026,
      "added_at": "2026-08-11T21:52:01.000Z",
      "has_dataset_profile": false,
      "license_class": "other",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 3,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/446",
      "markdown": "https://papers.projxon.ai/entries/446.md",
      "api": "https://papers.projxon.ai/api/entries/446"
    },
    {
      "id": 1074,
      "kind": "paper",
      "title": "A Smaller Transformer in Your Transformer",
      "summary": "arXiv 2609.20100v1 (cs.CV; submitted 2026-09-17; accepted BMVC 2026). Formalises ViT block redundancy (contiguous layers with high functional similarity) and proposes Transformer-Within-Transformer (TWT): max–min DP discovery of redundant phases, auditioned single-layer surrogate init, then single-stage deep-supervision distillation. Unlike Raptor/BRH (recurrent shared layer keeps FLOPs) or TOAST linear maps (lose token mixing), TWT replaces each phase with one ViT layer. Natural images: ~6-layer TWT ~half FLOPs, competitive ImageNet (e.g. DINOv2 B/14 84.2% vs 84.6% baseline / 84.0% Raptor-6). Histopathology H0-mini/Hibou-B: often matches or improves MIL QWK/accuracy at 3–5 layers. ADE20k denser drop. Code: https://github.com/dsb-ifi/TWT.",
      "url": "https://arxiv.org/abs/2609.20100",
      "authors": [
        "Dhananjay Tomar*",
        "Marius Aasan*",
        "Andreas Kleppe",
        "Adín Ramírez Rivera (*equal contribution)"
      ],
      "tags": [
        "twt",
        "transformer-within-transformer",
        "vit",
        "block-redundancy",
        "depth-pruning",
        "distillation",
        "histopathology",
        "dinov2",
        "dinov3",
        "deit-iii",
        "raptor",
        "toast",
        "bmvc-2026",
        "arxiv-2609.20100",
        "dsb-ifi"
      ],
      "venue": "arXiv / BMVC 2026 / Oslo University Hospital; University of Oslo; UiT SFI Visual Intelligence",
      "source": "arxiv",
      "license": "Author copyright (BMVC-style free unchanged distribution); arXiv preprint; GitHub dsb-ifi/TWT (no SPDX at catalog time)",
      "published_year": 2026,
      "added_at": "2026-09-26T15:30:00.000Z",
      "has_dataset_profile": false,
      "license_class": "other",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1074",
      "markdown": "https://papers.projxon.ai/entries/1074.md",
      "api": "https://papers.projxon.ai/api/entries/1074"
    },
    {
      "id": 1274,
      "kind": "paper",
      "title": "LiFT: Loop Flow Transformers",
      "summary": "UvA Amsterdam introduces LiFT, a family of looped generative models that scale computation by repeatedly applying a shared Diffusion Transformer (DiT) core with only light changes to the standard architecture. The key training innovation: rather than asking every recurrent step for the final prediction, each loop is supervised at its own target - a point on a straight reference path from the model's initial velocity estimate to the flow-matching target. Because targets are indexed by a continuous depth coordinate, the trained model can loop far beyond its training depth (K_inf > K_train) with no retraining, early exits, or other modifications, and longer rollouts improve generation - inference computation grows without adding parameters. Prelude-core-coda decomposition: prelude embeds input once, shared core R_theta applied K times (boundary operator reinjects input state), coda maps any state to a prediction. On ImageNet 256x256, LiFT-L/2 achieves FID 3.34 points lower than the dense DiT-XL/2 baseline while using ~60 percent fewer parameters, 32 percent fewer training FLOPs, and 52 percent fewer inference FLOPs. Separates two axes of inference compute: integration steps (follow the flow more closely) vs loops (estimate the velocity field more accurately). At DiT-B/2 the dense model still wins, so the advantage appears at larger scales. CC BY 4.0. Joins the looped-models cluster (670, 952, 1545, 1548, 1549, 1551, 1563, 1566, 1579, 1581) and complements ALoDLM (1581) - the other Oct-2026 looped-diffusion result, which adapts depth per token instead.",
      "url": "https://arxiv.org/abs/2610.05538",
      "authors": [
        "Mohammad Mahdi Derakhshani",
        "Pedro M. P. Curvo",
        "Gertjan J. Burghouts",
        "Jan-Willem van de Meent",
        "Cees G. M. Snoek"
      ],
      "tags": [
        "lift",
        "loop-flow-transformers",
        "diffusion-transformer",
        "looped-transformers",
        "flow-matching",
        "imagenet",
        "dit",
        "test-time-scaling",
        "recurrent-depth"
      ],
      "venue": "arXiv 2610.05538 [cs.LG], submitted 4 Oct 2026, preprint (UvA Amsterdam VISLab/AMLab, TNO)",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-06T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1274",
      "markdown": "https://papers.projxon.ai/entries/1274.md",
      "api": "https://papers.projxon.ai/api/entries/1274"
    },
    {
      "id": 542,
      "kind": "paper",
      "title": "Dr.LLM: Dynamic Layer Routing in LLMs",
      "summary": "Attaches a tiny MLP router to each frozen block; routers are supervised on 4k length-aware MCTS paths (skip/execute/repeat) from ARC and DART-Math, then run search-free at inference. On six LLaMA-3.2/Qwen-2.5 models, in-domain accuracy rises in all cases (up to +3.4%p / +4.0%p on DART) with ~3–11 fewer layers per query; OOD drop 0.85%p average. Beats LayerSkip/ShortGPT/MindSkip/FlexiDepth by up to +7.7%p avg on GSM8k/MMLU/HellaSwag/HumanEval. Code https://github.com/parameterlab/dr-llm.",
      "url": "https://arxiv.org/abs/2510.12773",
      "authors": [
        "Ahmed Heakl",
        "Martin Gubri",
        "Salman Khan",
        "Sangdoo Yun",
        "Seong Joon Oh"
      ],
      "tags": [
        "dr-llm",
        "layer-routing",
        "mcts",
        "adaptive-depth",
        "skip-repeat",
        "iclr",
        "mbzuai",
        "naver"
      ],
      "venue": "arXiv / Parameter Lab / MBZUAI / NAVER AI Lab",
      "source": "",
      "license": "",
      "published_year": 2025,
      "added_at": "2026-10-01T16:45:05.207Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 11,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/542",
      "markdown": "https://papers.projxon.ai/entries/542.md",
      "api": "https://papers.projxon.ai/api/entries/542"
    },
    {
      "id": 1430,
      "kind": "paper",
      "title": "TokenGate: Adapting LLMs for Fast and Memory-Efficient Prefill with Learned Token Pruning",
      "summary": "Problem: a transformer processes every input token through every layer, so long-context prefill (quadratic attention, linear MLP + KV growth) dominates serving cost. Prior work splits into training-free token-pruning heuristics (attention-score based; limited speedup before accuracy degrades) and architectural conditional compute (needs pretraining from scratch). TokenGate instead retrofits a trained model. Mechanism: a gate module sits inside one layer L (L=1 in the main experiments; multiple gates generalize). A small scoring MLP reads each prunable token's normalized post-attention residual at layer L and emits a scalar, RMS-normalized across the sequence into an importance score b_j; a top-K selector forwards S = top-K prunable tokens ∪ the non-prunable set (instructions, the question, answer/decoded tokens — in the code API, everything outside a marked {state} document span). Pruned tokens' residual streams stop at L: layers above L never process them and never generate KV entries for them, so the method is both prefill-compute skipping and upper-layer KV-cache reduction (layers ≤ L keep full KV by default; pruning those too is optional). The trainability trick is token-gated attention: in layers above the gate, each kept key's attention logit gets an additive bias softplus(γ^{ℓh})·b_j (head-wise learnable gains), under a temperature τ scaled by log(kept rank)/log(original position) (SSMax-inspired) that recalibrates softmax sharpness after pruning and generalizes across budgets — this gives gradients through the non-differentiable top-K, the same way MoE routers learn. Implemented as a FlashAttention-based kernel (custom FA2 key-bias kernel in the repo; FlexAttention fallback). Training: NOT from scratch and no sparsity/auxiliary loss — LoRA co-adaptation (r=16, α=32 on Q/V projections; backbone otherwise frozen; Muon for the gate matrices) plus gate parameters, plain next-token CE. Each step averages a full-context loss (K = all prunable tokens; anchors full-context accuracy and gives pruned tokens gradient) with a pruned loss at K ~ LogUniform(1, |𝒫|/2), so one trained gate serves every budget K at inference; the scoring MLP is zero-initialized. Training contexts 2k–16k tokens; a step costs 1.3× standard SFT but converges in fewer steps on 4 of 5 tasks, so total training time is comparable to or below LoRA SFT (mean 0.8× A100-hours at 1.7B). Results (Qwen3-1.7B, five tasks — NIAH 16k, RepoBench-P mean 11k/max 39k, 2WikiMultihopQA mean 7.5k, MultiNews, BioDEX): Pareto-dominant on all five; TTFT 1.4–11.3× faster and peak prefill memory 1.5–3.4× lower at no accuracy degradation vs the LoRA-fine-tuned full-context model, and up to 6.4× faster / ~2× lower memory than the best prior pruning baseline at matched accuracy (baselines: FastKV, SlimInfer, DASH, GemFilter; sparse-attention FlexPrefill, MInference). Launch-figure numbers at matched accuracy: NIAH TTFT 425→37 ms (11.3×; best prior 235 ms), peak memory 2.4→0.7 GB (3.4×); RepoBench TTFT 286→72 ms (3.9×; best prior 201 ms), memory 1.6→0.6 GB (2.8×). A more typical operating point: 2WikiMultihopQA at 95% of full-context accuracy = 3.0× faster, 2.7× less memory. Extrapolation: a gate trained at 16k holds accuracy at 32k/64k/128k with TTFT speedup rising to ~13× (memory reduction flat ~3.43×, since peak memory is dominated by the below-gate full forward). Ablations: the learned selector beats random-K and FastKV's attention-score selector at the same layer by wide margins; co-adaptation independently helps (random-K on the TokenGate-trained model beats random-K on the plain fine-tuned model — training redistributes information into kept tokens); learned keep-patterns are task-dependent (answer keywords for QA, phrase-final stopwords for summarization). Repo's held-out test table (batch 1, one H100): NIAH-16k @K=2000 accuracy 1.000 vs raw base 0.993 at 6.3× TTFT, still 1.000 at K=100 (8.1×); a 32k haystack demo answers the needle with 144 of 32,191 tokens retained above the gate. Hybrid architectures: on Qwen3.5-2B (24 layers; full attention at layers 3,7,11,…,23, Gated DeltaNet elsewhere) TokenGate can sit inside DeltaNet layers 1–2 — where attention-heuristic pruners cannot operate at all (FastKV can only prune at full-attention layers) — reaching up to 7.8× faster prefill within 6% of standard accuracy; at layer 3 it gives 3.8× lower TTFT at no accuracy loss, 2.1× better than the best FastKV run; token-gated attention applies only in full-attention layers above the gate, and DeltaNet layers above run on kept tokens only, their recurrent state built from kept tokens. Decoding (appendix): generated tokens attend to kept + generated tokens in layers above the gate, full context at/below it, with the gate bias precomputed once at prefill as a constant per-key bias — all headline claims are prefill/TTFT claims, no decode-speed claim. NOT GateSkip: the OpenReview/ICLR-2026 GateSkip paper (\"What Layers When,\" Laitenberger et al., HU Berlin/UvA/UT Nuremberg, arXiv 2510.13876) is a different work by different authors — residual gates for token-wise layer skipping (15–50% FLOP savings), uncited here.",
      "url": "https://arxiv.org/abs/2610.26754",
      "authors": [
        "Liana Patel",
        "Rishabh Ranjan",
        "Carlos Guestrin — Stanford University",
        "Ion Stoica",
        "Matei Zaharia — UC Berkeley. (Patel: LOTUS/ACORN/DeepScholar data-systems line",
        "Zaharia/Stoica orbit.)"
      ],
      "tags": [],
      "venue": "arXiv cs.CL preprint v1, submitted 19 Oct 2026 (no venue stated)",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-21T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1430",
      "markdown": "https://papers.projxon.ai/entries/1430.md",
      "api": "https://papers.projxon.ai/api/entries/1430"
    },
    {
      "id": 819,
      "kind": "paper",
      "title": "LibraryDesignBench: can agents design libraries other agents can use?",
      "summary": "Agents will soon replace humans as the main users and designers of libraries; a good library lets future agents write correct programs with less code. LibraryDesignBench: one agent designs a library, and three other agents write programs with it. 15 design tasks across four languages, with no prescribed APIs, abstractions, or guidance, to elicit genuine design decisions; programs are scored on correctness and simplicity. Results: agents using libraries designed by Opus 5.5 or Fable 5.1 pass as many tests as with the production human-written library while writing simpler code; with DeepSeek V4 Pro's libraries, agents do worse than with no library at all. Despite full design freedom, agents converged on the same patterns as the human library for 11 of 15 tasks. Most excess code stems from the library's design, not the implementer: rigid interfaces led agents to reimplement functionality (adding bugs), verbose interfaces forced more code. Giving the designer explicit guidance (start from prototypes, test with fresh subagents, more examples) made downstream programs shorter and improved score modestly at roughly twice the design cost. A standalone spin-off benchmark, LibraryUseBench, tests how well a model uses a real library with minimal guidance: Opus 5.5 leads, Sonnet 5.5 close behind, every newer model improves on its predecessor. Supported by DARPA, NSF, PrimeIntellect, and SnorkelAI's Open Benchmark Grant.",
      "url": "https://arxiv.org/abs/2609.36730",
      "authors": [
        "Gabe Orlanski",
        "et al. (collaborators: @a1zhang",
        "@atrost3122",
        "@vincentsunnchen",
        "@fredsala",
        "@awsTO",
        "@lschmidt3)"
      ],
      "tags": [
        "benchmarks",
        "agents",
        "library-design",
        "api-design"
      ],
      "venue": "arXiv (2026-09)",
      "source": "paper",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-09-30T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/819",
      "markdown": "https://papers.projxon.ai/entries/819.md",
      "api": "https://papers.projxon.ai/api/entries/819"
    }
  ]
}
