latte.functional.bundles.dependency_aware_mutual_info

Module Contents

Functions

dependency_aware_mutual_info_bundle(z, a[, reg_dim, ...])

Calculate Mutual Information Gap (MIG), Dependency-Aware Mutual Information Gap (DMIG), Dependency-Blind Mutual Information Gap (XMIG), and Dependency-Aware Latent Information Gap (DLIG) between latent vectors (z) and attributes (a).

dependency_aware_mutual_info_bundle(z, a, reg_dim=None, discrete=False)

Calculate Mutual Information Gap (MIG), Dependency-Aware Mutual Information Gap (DMIG), Dependency-Blind Mutual Information Gap (XMIG), and Dependency-Aware Latent Information Gap (DLIG) between latent vectors (z) and attributes (a).

Parameters:
  • z (np.ndarray, (n_samples, n_features)) – a batch of latent vectors

  • a (np.ndarray, (n_samples, n_attributes) or (n_samples,)) – a batch of attribute(s)

  • reg_dim (Optional[List], optional) – regularized dimensions, by default None Attribute a[:, i] is regularized by z[:, reg_dim[i]]. If None, a[:, i] is assumed to be regularized by z[:, i]. Note that this is the reg_dim behavior of the dependency-aware family but is different from the default reg_dim behavior of the conventional MIG.

  • discrete (bool, optional) – Whether the attributes are discrete, by default False

Returns:

A dictionary of mutual information metrics with keys [‘MIG’, ‘DMIG’, ‘XMIG’, ‘DLIG’] each mapping to a corresponding metric np.ndarray of shape (n_attributes,).

Return type:

Dict[str, np.ndarray]

See also

disentanglement.mig

Mutual Information Gap

disentanglement.dmig

Dependency-Aware Mutual Information Gap

disentanglement.xmig

Dependency-Blind Mutual Information Gap

disentanglement.dlig

Dependency-Aware Latent Information Gap

References

[1]
  1. Chen, X. Li, R. Grosse, and D. Duvenaud, “Isolating sources of disentanglement in variational autoencoders”, in Proceedings of the 32nd International Conference on Neural Information Processing Systems, 2018.

[2]
    1. Watcharasupat and A. Lerch, “Evaluation of Latent Space Disentanglement in the Presence of Interdependent Attributes”, in Extended Abstracts of the Late-Breaking Demo Session of the 22nd International Society for Music Information Retrieval Conference, 2021.

[3]
    1. Watcharasupat, “Controllable Music: Supervised Learning of Disentangled Representations for Music Generation”, 2021.