liveBook · Manning

Softmax

As explained in Build AI Drug Discovery Pipelines

Softmax is a function that converts a vector of scores into nonnegative values summing to one.

Softmax converts a vector of logits—raw scores produced by a model—into nonnegative probabilities that sum to one. Each class has its own feature weights, and prediction selects the class with the highest probability. section 5.4.1 section 10.4.3

P(Y=i)=esi∑j=1Kesj

Use the equation to see how each class score becomes a probability relative to the exponentiated scores of all classes. section 5.4.1

Softmax appears in two different molecular-machine-learning workflows:

  • In CYP inhibition classification, it provides probabilities across five cytochrome P450 classes and supports cross-entropy training. This setup incorrectly forces every molecule into exactly one class, even though a molecule may inhibit none or several CYPs. section 5.4.1
  • In a molecule-generating seq2seq decoder, it converts vocabulary-sized logits into next-character probabilities for SMILES generation. A sampling method then selects the next character. section 10.4.3

Temperature sampling

A decoder can generate molecules from a latent vector by repeatedly applying softmax to output logits and sampling characters until the SMILES sequence ends. Temperature sampling controls this generation process.

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains class-specific weights, logits, probability conversion, prediction, and cross-entropy, while flagging the single-class assumption.
Examples
Uses five CYP inhibition classes, SMILES vocabulary prediction, and temperature-based molecule generation as concrete applications.
What it assumes
Builds from logistic regression's binary probability idea and introduces logits, class weights, and vocabulary-sized decoder outputs.
What you can do after
Apply it via multiclass models and molecular decoders to interpret class probabilities or sample the next SMILES character.
How it connects
Connects logistic regression, multiclass classification, cross-entropy loss, logits, seq2seq architecture, GRU decoders, and temperature sampling.

Also explained in

Compare how 26 books explain softmax →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.