# Inference Synthesis

Inference synthesis in Allora is a process that combines individual inferences from various workers to produce an aggregate inference. This process takes place at each epoch and involves both inference and forecasting tasks.

## Normalization of Regrets

Regrets are normalized to ensure weights are comparable and within a reasonable range.

This allows the use of a single mapping function to map regrets to weights, independently of the absolute scale of the losses and regrets. The regret is normalized using its standard deviation across all workers, adjusted by a small constant 𝜖:

- Here, 𝜎𝑗σ is the standard deviation of 𝑅𝑖𝑗𝑘 for a particular inference across all workers.
- The small constant 𝜖 ensures numerical stability and avoids division by zero.

### Using Normalized Regrets for Weights

The normalized regrets 𝑅𝑖𝑗𝑘 are then used to calculate the weights for each inference:

These weights determine how much each raw inference 𝐼𝑖𝑗 will contribute to the final network inference.

## Forecast-Implied Inferences

The Topic Coordinator takes the forecasted losses and normalized weights and produces forecast-implied inferences. A forecast-implied inference is a predicted value of a target variable that combines different
forecasters' predictions and workers' inferences, where each prediction is weighted based on how accurately the forecasters predicted losses in previous time steps, or *epochs*.

Here, 𝑤𝑖𝑗𝑘 are weights assigned to each inference based on the forecasted regret.

## Final Network Inference

The final inference for the network is a weighted combination of all individual inferences following a procedure similar to the generation of forecast-implied inferences discussed above, but using the actual regrets based on the losses provided by reputers instead of forecasted losses. This combined result is expected to be more accurate and reliable due to the weighting process.