2022 Developer Survey is open! Take survey.

Questions tagged [objective-functions]

For questions related to the concept of loss (or cost) function in the context of machine learning.

Filter by
Sorted by
Tagged with
1 vote
0 answers
39 views

Learning values in open ball: which final layers to employ?

I'm fairly new to deep learning and looking for some reference literature... Specifically, I want to train a neural network to predict vectors $v \in \mathbb{R}^3$ under the constraint $||v||\leq 1$. ...
user avatar
  • 111
0 votes
1 answer
24 views

How is catastrophic cancellation dealt with in loss functions?

It just occurred to me that this seems like it should be a very common problem that must have some kind of solution... Yet I'm not sure what it is... If there is no solution, does this mean once a ...
user avatar
  • 266
0 votes
0 answers
22 views

how to define or calculate the similarity betweeen two curves as the loss funtion to optimize in the generative model?

I want to train a neural network as the curve productor that can generate the specific type of curves (e.g. exponential decay curves). I take the encoder-decoder structure, the curves in a dataset is ...
user avatar
1 vote
1 answer
119 views

What is the reason we loop over epochs when training a neural network?

After reading through this thread and some other resources online, I still do not understand the role of epochs in training a neural network. I understand that one epoch is one iteration through the ...
user avatar
0 votes
0 answers
17 views

How to fine-tune RoBERTa using Triplet Objective Function

I want to see if we can improve the triplet objective function of SBERT by slightly tweaking the equation terms. To do so, In your opinion, what's the easiest way to fine-tune RoBERTa? How can I ...
user avatar
  • 103
3 votes
2 answers
348 views

What is the difference between a loss function and reward/penalty in Deep Reinforcement Learning?

In Deep Reinforcement Learning (DRL) I am having difficulties in understanding the difference between a Loss function, a reward/penalty and the integration of both in DRL. Loss function: Given an ...
user avatar
  • 131
0 votes
0 answers
48 views

In CVAE's objective function, why do both terms condition on $\textbf{c}$?

I don't quite understand why, in Conditional Variational Autoencoder (CVAE), we concatenate a conditioning vector two times, at encoder and decoder respectively. After we concatenate it once at the ...
user avatar
0 votes
0 answers
53 views

How to reduce loss of Bi-LSTM handwriting recognition model?

I am currently training an bi-LSTM model which predicts the handwriting of an individual. I am hitting a current min loss of 1.2 and I think it is not a problem with the model because I copied a model ...
user avatar
0 votes
1 answer
53 views

Does the summing or averaging of the weight gradients have anything to do with the cost function used?

I've been trying to implement my own neural network library and have been wondering if: The SSE loss function includes the summation of the errors in the other training examples of the mini-batch (...
user avatar
1 vote
1 answer
31 views

What inherent quality of a function makes it treated as either loss or evaluation metric?

A neural network model needs a loss function for training. The neural network needs to minimize the loss function. A neural network is evaluated after training using a metric. The neural network needs ...
user avatar
  • 3,029
-1 votes
1 answer
85 views

Why is the cross-entropy a cost function?

The question looks foolish, but I think cross-entropy is somewhat weird as a cost function. As a cost function for linear regression, the mean square error $ \sum_{i=1}^{n} (y_i - (ax_i+b)) ^2$ seems ...
user avatar
  • 115
3 votes
1 answer
52 views

Custom Tensorflow loss function that disincentivizes all black pixels

I'm training a Tensorflow model that receives an image and segments the image into foreground and background. That is, if the input image is w x h x 3, then the ...
user avatar
  • 33
1 vote
0 answers
23 views

a loss for binary step function data

I have some data with ground truth that looks like a binary step function, where part of it is 0 and part is one. An example for the GT can be like ...
user avatar
  • 111
1 vote
0 answers
47 views

GANs: Why does iterative gradient descent sometimes optimise $\min_G \max_D V(D,G)$ and sometimes $\max_D \min_G V(D,G)$?

For the following minimax equation for generative adversarial networks (GANs), $$\min_G \max_D V(D,G) = \mathbb{E}_{\boldsymbol{x}\sim p_{data}(\boldsymbol{x})}[\log D(\boldsymbol{x})] + \mathbb{E}_{\...
user avatar
1 vote
1 answer
75 views

Why are logarithms used in GANs minimax equation?

The minimax equation for generative adversarial networks $$\min_G \max_D V(D,G) = \mathbb{E}_{\boldsymbol{x}\sim p_{data}(\boldsymbol{x})}[\log D(\boldsymbol{x})] + \mathbb{E}_{\boldsymbol{z}\sim p_{\...
user avatar
0 votes
0 answers
31 views

How to smooth a cost function?

I have a combinatorial optimization problem whose loss function is really unsmooth now. Without specifying my problem in detail, I was wondering if there are some general methods/steps I can apply to ...
user avatar
  • 121
2 votes
2 answers
94 views

What specifically is the gradient of the log of the probability in policy gradient methods?

I am getting tripped up slightly by how specifically the gradient is calculated in policy gradient methods (just the intuitive understanding of it). This Math Stack Exchange post is close, but I'm ...
user avatar
0 votes
0 answers
29 views

What loss function should be used for negative log likelihood labels

I am trying to build a ranking CNN model for document - query pairs using MS Marco dataset and python pytorch. My supervisor suggested to use the same CNN to extract feature vector for document and ...
user avatar
  • 101
1 vote
1 answer
62 views

Test accuracy decreases during my train process

I want to train a neural network model with the arcface loss function and try to combine it with domain adaption. But when the training process continues, I find the test accuracy first increases and ...
user avatar
  • 11
1 vote
0 answers
42 views

Where do the objective functions proposed in this paper by Carlini-Wagner attack come from?

I'm trying to understand the paper by Carlini and Wagner on deep neural networks adversarial attacks. On page 44, in Section V-A, it is explained how the loss function to the described problem was ...
user avatar
  • 111
2 votes
0 answers
19 views

Can a GIoU loss (generalized intersection over union) be used after an STN module (spatial transformer network)?

I have a model that uses an STN module for number detection and Mean Squared Error loss. But I would like to replace it for GIoU, because MSE doesn't take into account how much of the target area has ...
user avatar
  • 201
2 votes
1 answer
25 views

Are the domains of objective functions in AI always equals to $\mathbb{R}^D$ or subset of it?

Consider the following paragraph from the chapter named Vector Calculus from the textbook titled Mathematics for Machine Learning by Marc Peter Deisenroth et al. Central to this chapter is the ...
user avatar
  • 3,029
0 votes
1 answer
19 views

Multi-class classification but a single feature sometimes boils it down to a binary-classification

I have a three-class classification problem for a large dataset. Classes are 0, 1, and 2. There's a categorical variable in my feature vectors such that when a sample point has this variable positive, ...
user avatar
  • 1
2 votes
0 answers
48 views

How to choose the new layer and objective function for transfer learning on a neural network?

I have a base model $M$ trained on a data say type 1 for task $T$. Now, I want to update $M$ by applying transfer learning for it to work on data type 2 for the same task $T$. I am very new to AI/ML ...
user avatar
  • 121
1 vote
2 answers
49 views

When would it make sense to perform a gradient descent step for each term of a loss function with multiple terms?

I am training a neural network using a mini-batch gradient descent algorithm. Now, consider the following loss function, which is composed of 2 terms. $$L = L_{\text{MSE}} + L_{\text{regularization}} \...
user avatar
  • 3,029
1 vote
0 answers
66 views

What is the confusion loss for adversarial learning?

What is the confusion loss used in domain adaptation (DA) for adversarial learning/GANs? See this paper. Two domains: $s$: source domain $t$: target domain Generator/Discriminator setting: $M_s:x_s\...
user avatar
  • 11
0 votes
0 answers
36 views

Is there anything wrong with this YOLO loss function?

I have implemented the YOLOv1 loss function as: ...
user avatar
1 vote
0 answers
41 views

When can we call a loss function "adaptive"?

A loss function is a measure of how bad our neural network is. We can decrease the loss by proper training. I came across the phrase "adaptive loss function" in several research papers. For ...
user avatar
  • 3,029
1 vote
0 answers
37 views

Is there any significance for higher order gradients in artificial intelligence?

Although I don't know in detail, I am aware of the following facts regarding the use of gradients in some domains of artificial intelligence, especially in minimizing the training of neural networks. ...
user avatar
  • 3,029
0 votes
1 answer
27 views

How do I select the class weights for the loss function in the case of more than 2 classes?

I have a machine learning task where I would like to weight losses based on the frequency of the categorical values appearing in the data. The binary solution can be seen below, but I'd like to know ...
user avatar
0 votes
0 answers
21 views

Do I need to imagine loss curves of changing shapes in case of GANs?

Loss function, in general, is imagined as a curve in higher dimensional space with weights on input axes and loss on output axes. Suppose we have a neural network and we are training our neural ...
user avatar
  • 3,029
1 vote
1 answer
181 views

Is there any difference between an objective function and a value function?

I found the usage of both objective function and value function in the same context. Context #1: In the paper titled Generative Adversarial Nets by Ian J. Goodfellow et al. We simultaneously train G ...
user avatar
  • 3,029
0 votes
1 answer
75 views

Does average loss function in GAN training is just an approximation of value function and does not ensure convergence of generator and discriminator?

The value function on which convergence has been proved by the original paper of GAN is $$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] + \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]$$ and ...
user avatar
  • 3,029
2 votes
2 answers
806 views

How to check whether my loss function is convex or not?

Loss functions are useful in calculating loss and then we can update the weights of a neural network. The loss function is thus useful in training neural networks. Consider the following excerpt from ...
user avatar
  • 3,029
3 votes
1 answer
102 views

What are the necessary mathematical properties to be a loss function in gradient based optimizations?

Loss functions are used in training neural networks. I am interested in knowing the mathematical properties that are necessary for a loss function to participate in gradient descent optimization. I ...
user avatar
  • 3,029
2 votes
1 answer
90 views

Why is the exponential loss used in this case?

I am reading the paper Tracking-by-Segmentation With Online Gradient Boosting Decision Tree. In Section 2.1, the paper says Given training examples, $\left\{\left(\mathbf{x}_{i}, y_{i}\right) \mid \...
user avatar
2 votes
0 answers
37 views

Is optimizing weighted sum multi objective tasks considered a multi-task learning?

I have two sequence prediction tasks, finding $\vec{\pi} \in \Pi$ and $\vec{\psi} \in \Psi$. Each sequence has its own objective function, i.e. $f_1(\vec{\pi})$ and $f_2(\vec{\psi})$. The input for ...
user avatar
  • 143
0 votes
0 answers
26 views

Can people set loss function of neural network by themselves instead of choosing cross entropy or mean square error?

I found people used deep neural network to get optimal policy by solving a nonconvex optimization problem. Moreover, they didn't use any set of training data and claimed that it's the difference ...
user avatar
0 votes
0 answers
36 views

An explanation involving the sign activation, its affect on the loss function, and the perceptron and perceptron criterion: what is this saying? (#2)

I recently asked a very similar question here, but the answer only seems to address the first part of the quote, rather than the second part that contains the perceptron criterion example. Therefore, ...
user avatar
1 vote
0 answers
32 views

Is the formula $\frac {1}{s}\sum _{j=1}^{s}|d_{j}-y_{j}(t)|$ the correct form of 0-1 loss function, in the context of Perceptron?

Per page 7 of this MIT lecture notes, the original single-layer Perceptron uses 0-1 loss function. Wikipedia uses $${\displaystyle {\frac {1}{s}}\sum _{j=1}^{s}|d_{j}-y_{j}(t)|} \tag{1}$$ to denote ...
user avatar
  • 201
0 votes
0 answers
15 views

Loss function to Push response value towards extremes

I have a feature map whose values are in the range of [0,1]. I want to push these values either towards extreme 0 or 1 using some loss function. Since I don't have any target value so it had to be in ...
user avatar
0 votes
1 answer
69 views

An explanation involving the sign activation, its affect on the loss function, and the perceptron and perceptron criterion: what is this saying?

I am currently studying the textbook Neural Networks and Deep Learning by Charu C. Aggarwal. Chapter 1.2.1.3 Choice of Activation and Loss Functions says the following: The classical activation ...
user avatar
3 votes
3 answers
885 views

In logistic regression, why is the binary cross-entropy loss function convex?

I am studying logistic regression for binary classification. The loss function used is cross-entropy. For a given input $x$, if our model outputs $\hat{y}$ instead of $y$, the loss is given by $$\text{...
user avatar
  • 3,029
2 votes
3 answers
257 views

Where does the so-called 'loss' / 'loss function' fit into the idea of a perceptron / artificial neuron (as presented in the figure)?

I am currently studying the textbook Neural Networks and Deep Learning by Charu C. Aggarwal. Chapter 1.2.1.3 Choice of Activation and Loss Functions presents the following figure: $\overline{X}$ is ...
user avatar
0 votes
0 answers
31 views

Good metrics and losses to use for Sequence-to-Sequence model for time-series prediction/forecasting

I am developing a sequence-to-sequence LSTM model for multi-step time series forecasting. I have the basic model working, so now I need to drill down on which loss function and evaluation metrics to ...
user avatar
  • 187
0 votes
0 answers
25 views

Maximize delayed rewards

Given a Neural Network with a Dense(3) output and three actions: 'B' is [0, 0, 1] (= 1, for the sake of our example) 'N' is ...
user avatar
  • 101
3 votes
0 answers
129 views

Loss function to minimize the distance between sets

Are there references or links to examples about loss functions "Distance Metrics" which could be used to minimize the distance between two sets for a neural network. More precisely, this ...
user avatar
  • 131
0 votes
0 answers
41 views

Problems while transforming a 2D Variational Autoencoder into a 1D Version

I am trying to addapt the Keras variational autoencoder (VAE) here from a 2-D input/output (matrix of a picture) to a 1-D input/output (just a vector). I thought this would be a fearly easy task, but ...
user avatar
0 votes
1 answer
61 views

Which loss function could I use to solve a regression problem as a classification problem (where we discretize the labels into buckets)?

I am considering a rather typical regression problem, but, for practice, I am trying to implement this as a classification problem. The setup is as follows. I have $\mathbb{R}$-valued labels $y_i \in [...
user avatar
0 votes
1 answer
178 views

Why is loss displayed as a parabola in mean squared error with gradient descent?

I'm looking at the loss function: mean squared error with gradient descent in machine learning. I'm building a single-neuron network (perceptron) that outputs a linear number. For example: Input * ...
user avatar
  • 167

1
2 3 4 5