Git Product home page Git Product logo

Comments (4)

zerohd4869 avatar zerohd4869 commented on August 17, 2024 1

You claim that your "probabilistic coding integrates probabilistic encoding and task prediction into one encoder module with the network θ, and applies a non-parametric operation to obtain prediction outputs."

But there seems to be no significant difference in your code compared with VIB. Would you tell me how you deal with probabilistic coding differently compared with VIB ?

Thank you for your attention.

In the implementation, probabilistic coding (PC) only has the $\theta$ parameter in the probabilistic coding module that needs to be learned, while VIB contains two sets of parameters that need to be learned: $\theta$ in the probabilistic encoding module and $\phi$ in the task decoder. For PC, the class "StochasticTaskModule" in the "model.py" file is a stochastic head, which directly decodes to the target task space through probabilistic operations. However, for VIB, in addition to the stochastic operations, a deterministic decoder containing learnable parameters $\phi$ (e.g., a learnable linear layer) must be used afterwards to map it for target task prediction. Totally, PC allows the model to jointly learn the probabilistic encoding and the task-specific prediction, rather than separating them into distinct modules as in VIB.

Therefore, the main differences are:

  1. Non-parametric Task Prediction: After the probabilistic embedding, PC applies a non-parametric operation to directly obtain the prediction outputs, without the need for an additional deterministic decoder module (with learnable parameters $\phi$) as in VIB.
  2. Dimension Mapping: In VIB, the stochastic module is typically performed with a fixed dimension, and a subsequent deterministic decoder is used to map this fixed-size embedding to the target task space. In PC, the stochastic module directly maps the original feature dimensions to the label space dimensions, without an intermediate fixed-size bottleneck.

I hope this helps clarify the key differences between PC and VIB.

from spc.

zerohd4869 avatar zerohd4869 commented on August 17, 2024 1

Thank you for your reply! However, I am still confused about how the non-parametric operation makes predictions.

Taking a classification task with 3 labels as an example, if a sample's output tensor after using pc is [-0.1, 0.1, 0.3], then using the non-parametric operation argmax (i.e., "predicted_label = torch.argmax(model_output[0], -1)" in the "main.py" file) would yield the index of the predicted label as 2. Since the pc process has already mapped the vector dimensions to the label space dimensions during the probabilistic process, there is no need to introduce an extra parameterized classifier network.

from spc.

2020213484 avatar 2020213484 commented on August 17, 2024

Thank you for your reply!
However, I am still confused about how the non-parametric operation makes predictions.

from spc.

2020213484 avatar 2020213484 commented on August 17, 2024

Thank you so much!

from spc.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.