Logit Attribution
Plotly visualization for LogitAttribution results.
Renders the top contributors to the target logit (difference) as a horizontal
bar chart, signed so positive bars push toward the answer and negative bars push
away. The embedding and the catch-all other term are included alongside the
named attention-head and MLP components.
Requires the plot extra (install with pip install murano-interp[plot]).
plot_logit_attribution
Section titled “plot_logit_attribution”def plot_logit_attribution(result: LogitAttributionResult, top_k: int = 20, title: str = 'Direct Logit Attribution') -> go.Figure:Render the top-contributing components as a signed horizontal bar chart.
Args:
result: LogitAttributionResult produced by the LogitAttribution step.top_k: Number of components to show, ranked by absolute contribution.title: Plot title.
Returns:
- A
plotly.graph_objects.Figurewith one horizontal bar per component, - most influential at the top, colored by sign.