> For the complete documentation index, see [llms.txt](https://docs.quantaria.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quantaria.xyz/deep-dives/rank-adaptive-training.md).

# Rank-adaptive training

Rank-adaptive training lets a tensor network choose its own bond dimensions during training, instead of fixing them in advance. This page explains the idea and its place in Quantaria's models.

## The problem with fixed ranks

If you fix χ for every bond, you must guess the right capacity before training. Too small and the model underfits. Too large and you lose the size advantage. A uniform χ also ignores that some bonds carry more structure than others.

## The idea

Make the bond dimensions part of the optimization. Bonds that carry little information shrink. Bonds that need more capacity grow. The objective balances accuracy against size, so the model finds the trade-off instead of being told it.

## Multi-objective loss

A typical formulation adds a term that penalises parameter count or memory to the task loss. The weight on that term sets how aggressively the bonds shrink. Quantaria's rank-adaptive training follows the approach in CoMERA ([arXiv:2405.14377](https://arxiv.org/abs/2405.14377)), which reports 9x more memory-efficient training than GaLore with 2–3x faster epochs. Those are the paper's results, on its setup.

## Connection to truncation

Shrinking a bond is a truncation: discard the smallest singular values (see [SVD and truncation](/deep-dives/svd-and-truncation.md)). Growing a bond adds directions with small singular values. Either way the bond's Schmidt spectrum guides the change.

## What to watch for

* Rank changes can destabilise training if they happen too often. Changing ranks in steps, not continuously, is one way to keep training stable.
* A rank setting that looks good on one task may be wrong on another.

## Quantaria's use

Hilbert-1 uses rank-adaptive training, as listed in [Features](https://github.com/bhavy2908/dataai_docs/tree/main/product/features.md). The final bond sizes are a result of training, so they are not fixed in the docs. The planned area-law method would set bond sizes from measured entanglement; see [Bond dimension and entanglement entropy](/deep-dives/bond-dimension-and-entanglement.md).

## Related

* [Parameter counting](/deep-dives/parameter-counting.md)
* [Tensor-Network Weights](https://github.com/bhavy2908/dataai_docs/tree/main/architecture/tensor-network-weights.md#rank-adaptive-training)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.quantaria.xyz/deep-dives/rank-adaptive-training.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
