Audit Q, V, Policy and Advantage Objectives
Apply Models From First Principles Step 02 to verify whether a shared representation with multiple learned heads has coherent targets, losses and downstream roles.
How to use this
- Open a repository-aware AI assistant.
- Give it access to the repository or files you want reviewed.
- Copy the prompt below and run it unchanged first.
- Use the evidence it finds to decide what to inspect or change next.
PromptCopy and run against your own project
Review this repository as a learned-decision system with multiple heads such as Q, V, policy, advantage, score, confidence, reward or related outputs.
Do not assume that more heads mean better modeling. Reconstruct why each head exists and what distinct failure it is supposed to solve.
For every head identify:
- exact input representation;
- prediction target;
- target provenance;
- loss function and coefficient;
- update frequency;
- gradient path into shared layers;
- downstream consumer;
- inference-time role.
Then build an objective matrix showing where heads share data, representations, labels and gradients.
Check for:
- two heads learning the same quantity under different names;
- advantage derived inconsistently from Q and V;
- policy targets that disagree with the value objective;
- one loss dominating shared representation learning;
- detached or accidentally coupled gradients;
- target leakage between heads;
- labels unavailable at inference being used indirectly as features;
- outputs computed but not used downstream;
- shared encoders forcing incompatible tasks into one representation.
For each issue cite exact files/symbols and separate confirmed behavior from inference.
Require evidence before recommending a separate network, extra head, auxiliary loss or more capacity.
Output:
1. Multi-head architecture map
2. Objective/target matrix
3. Gradient-sharing map
4. Redundant or conflicting heads
5. Leakage and proxy risks
6. Heads that earn their place
7. Smallest ablations or experiments
8. Recommendation: Keep / Merge / Separate / Remove
Each learned output must correspond to a distinct decision need, not merely an architectural possibility.