text
stringlengths
81
47k
source
stringlengths
59
147
Question: <p>On a very informal level, if we were to compare the (classical) <strong>Gradient Descent Algorithm to the Stochastic Gradient Descent Algorithm</strong>, the first thing that comes to mind is:</p> <ul> <li>Gradient Descent can be considered as a slower algorithm than Stochastic Gradient Descent, since it r...
https://ai.stackexchange.com/questions/34532/in-general-is-stochastic-gradient-descent-a-superior-algorithm-compared-to-g
Question: <p>My understanding is this: When doing Stochastic Gradient Descent over a neural network, in every epoch, we run <span class="math-container">$n$</span> iterations (where the dataset has <span class="math-container">$n$</span> training examples) and in every iteration, we take a random sample and update the ...
https://ai.stackexchange.com/questions/43688/what-do-you-mean-by-updating-based-on-a-training-example-batch-in-gradient-des
Question: <p>I was reading a blog post that talked about the problem of the saddle point in training. </p> <blockquote> <p>In the post, it says if the loss function is flatter in the direction of x (local minima here) compared to y at the saddle point, gradient descent will oscillate to and from the y direction. Thi...
https://ai.stackexchange.com/questions/18410/oscillating-around-the-saddle-point-in-gradient-descent
Question: <p>We require to find the gradient of loss function(cost function) w.r.t to the weights to use optimization methods such as SGD or gradient descent. So far, I have come across two ways to compute the gradient:</p> <ol> <li>BackPropagation</li> <li>Calculating gradient of loss function by calculus</li> </ol> ...
https://ai.stackexchange.com/questions/19895/different-methods-of-calculating-gradients-of-cost-functionloss-function
Question: <p>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:</p> <p>Input * Weight + Bias &gt; linear activation &gt; output.</p> <p>Let's say the output is 40 while I expect the ...
https://ai.stackexchange.com/questions/27390/why-is-loss-displayed-as-a-parabola-in-mean-squared-error-with-gradient-descent
Question: <p>I am studying a chapter named <a href="https://www.deeplearningbook.org/contents/numerical.html" rel="nofollow noreferrer">Numerical Computation</a> of a deep learning book. Afaik, it does not deal with flat regions with desired points.</p> <p>For example, let us consider a function whose local/global mini...
https://ai.stackexchange.com/questions/30300/do-gradient-based-algorithms-deal-with-the-flat-regions-with-desired-points
Question: <p>From wikipedia page it mentioned:</p> <blockquote> <p>To economize on the computational cost at every iteration, stochastic gradient descent samples a subset of summand functions at every step. This is very effective in the case of large-scale machine learning problems</p> </blockquote> <p>And later on it ...
https://ai.stackexchange.com/questions/34440/unclear-fact-about-difference-between-gradient-descent-to-stochastic-gradient-de
Question: <p>From <a href="https://futurism.com/elon-musk-an-ai-attack-on-the-internet-is-only-a-matter-of-time/" rel="nofollow noreferrer">Futurism.com</a>:</p> <blockquote> <p>Musk indicates that internet infrastructure is "particularly susceptible" to a method called gradient descent algorithm, a mathematical pro...
https://ai.stackexchange.com/questions/3187/does-musk-know-what-gradient-descent-is
Question: <p>I am writing my own recurrent neural network in Java to understand the inner workings better. While working through the math, I found that in timesteps later than 2 the gradient of weight w of neuron n depends on the gradients of all neurons at all timesteps before. A handwritten example is given, I tried ...
https://ai.stackexchange.com/questions/3761/are-gradients-of-weights-in-rnns-dependent-on-the-gradient-of-every-neuron-in-th
Question: <p>On this video</p> <p><a href="https://www.youtube.com/watch?v=YUVLgccVi54" rel="nofollow noreferrer">Link to video</a></p> <p>a neurologist starts by saying that we do not know how neurons calculate gradients for backpropagation.</p> <p>At minute 30:39 hes showing faster convergence for "our algorithm",...
https://ai.stackexchange.com/questions/6395/what-can-be-deduced-about-the-algorithm-of-backpropagation-gradient-descent
Question: <p>I am learning Reinforcement Learning from the lectures from David Silver. I finished lecture 6 and went on to try SARSA with linear function approximator for MountainCar-v0 environment from OpenAI.</p> <p>A brief explanation of the MountainCar-v0 environment. The state is denoted by two features, position...
https://ai.stackexchange.com/questions/9590/sarsa-wont-work-for-linear-function-approximator-for-mountaincar-v0-in-openai-e
Question: <p>I am looking for an example in which it is simply impossible to use some sort of gradient descent to train a neural network. Is this available? </p> <p>I have read quite some papers about gradient-free optimization tools, but they always use it on a network for which you can also use gradient descent. I w...
https://ai.stackexchange.com/questions/12938/neural-networks-when-gradient-descent-is-not-possible
Question: <p>Classical gradient descent algorithms sometimes overshoot and escape minima as they depend on the gradient only. You can see such a problem during the update from point 6.</p> <p><a href="https://i.sstatic.net/XJu8M.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XJu8M.jpg" alt="enter image ...
https://ai.stackexchange.com/questions/35648/at-which-point-does-the-momentum-based-gd-helps-really-in-this-figure
Question: <p>I am learning linear regression model based on this <a href="https://github.com/d2l-ai/d2l-zh/blob/master/chapter_linear-networks/linear-regression-scratch_origin.md?plain=1#L380" rel="nofollow noreferrer">tutorial</a>. Following the example provided in the tutorial, it works fine with mini-batch stochasti...
https://ai.stackexchange.com/questions/48379/loss-keep-increasing-when-using-full-batch-gradient-descent
Question: <p>So, deep learning models are great at learning complex, non-linear patterns and seem to handle noise just fine. But under the hood, they rely on IEEE754 floating-point numbers, which can lose precision (e.g., rounding errors). Meanwhile, cryptography, like elliptic curve crypto, also deals with theoretical...
https://ai.stackexchange.com/questions/48193/why-doesnt-deep-learning-use-modular-arithmetic-like-cryptography-even-though
Question: <p>Does it make sense for a <a href="https://ai.stackexchange.com/q/47986/48038">computational graph</a> to have entirely non-differentiable functions?</p> <p>For example, <a href="https://pytorch.org/docs/stable/notes/autograd.html#gradients-for-non-differentiable-functions" rel="nofollow noreferrer">PyTorch...
https://ai.stackexchange.com/questions/48014/does-it-make-sense-for-a-computational-graph-to-have-entirely-non-differentiable
Question: <p>The objective function of an SVM is the following:</p> <p><span class="math-container">$$J(\mathbf{w}, b)=C \sum_{i=1}^{m} \max \left(0,1-y^{(i)}\left(\mathbf{w}^{t} \cdot \mathbf{x}^{(i)}+b\right)\right)+\frac{1}{2} \mathbf{w}^{t} \cdot \mathbf{w}$$</span> where</p> <ul> <li><span class="math-container">$...
https://ai.stackexchange.com/questions/20169/what-is-the-gradient-of-a-non-linear-svm-with-respect-to-the-input
Question: <p>I studied the articles on <a href="http://neuralnetworksanddeeplearning.com/" rel="noreferrer">Neural Networks and Deep Learning</a> from Michael Nielsen and developed a simple neural network based on his examples. I understand how backpropagation works and I already taught my neural network to not only pl...
https://ai.stackexchange.com/questions/3854/can-a-neural-network-learn-to-avoid-wrong-decisions-using-backpropagation
Question: <p>I'm struggling with an inverse reinforcement learning problem which seems to appear quite often around the literature, yet I can't find any resources explaining it.</p> <p>The problem is that of calculating the gradient of a Boltzmann policy distribution over the reward weights <span class="math-container...
https://ai.stackexchange.com/questions/7147/how-can-we-calculate-the-gradient-of-the-boltzmann-policy-over-reward-function
Question: <p><a href="https://page.mi.fu-berlin.de/rojas/neural/chapter/K8.pdf#page=9" rel="nofollow noreferrer">Raul Rojas' Neural Networks A Systematic Introduction, section 8.1.2</a> relates off-line backpropagation and on-line backpropagation with Gauss-Jacobi and Gauss-Seidel methods for finding the intersection o...
https://ai.stackexchange.com/questions/11407/are-on-line-backpropagation-iterations-perpendicular-to-the-constraint
Question: <p>As mentioned in the title I'm using 300 Dataset example with 500 feature as an input.</p> <p>As I'm training the dataset, I found something peculiar. Please look at the data shown below.</p> <blockquote> <p><strong>Iteration 5000 | Cost: 2.084241e-01</strong></p> <p>Training Set Accuracy: 100.000...
https://ai.stackexchange.com/questions/13109/in-nn-as-iterations-of-gradient-descent-increases-the-accuracy-of-test-cv-set
Question: <p><strong>What I did:</strong><br> Created a population of 2D legged robots in a simulated environment. Found the best motor rotation values to make the robots move rightward, using an objective function with Differential Evolution (could use PSO or GA too), that returned the distance moved rightward. Gradie...
https://ai.stackexchange.com/questions/15685/how-to-calculate-multiobjective-optimization-cost-for-ordinary-problems
Question: <p>The learning rate in my model is <code>0.00001</code> and the gradients of the model is within the distribution of <code>[-0.0001, 0.0001]</code>. Is it normal?</p> Answer:
https://ai.stackexchange.com/questions/18325/why-gradients-are-so-small-in-deep-learning
Question: <p>How can I prove that gradient descent doesn't necessarily find the global optimum?</p> <p>For example, consider the following function</p> <p><span class="math-container">$$f(x_1, x_2, x_3, x_4) = (x_1 + 10x_2)^2 + 5x_2^3 + (x_2 + 2x_3)^4 + 3x_1x_4^2$$</span></p> <p>Assume also that we can't find the op...
https://ai.stackexchange.com/questions/18658/how-to-prove-that-gradient-descent-doesnt-necessarily-find-the-global-optimum
Question: <p>Recently, I followed the open course CS229, <a href="http://cs229.stanford.edu/notes/cs229-notes1.pdf" rel="nofollow noreferrer">http://cs229.stanford.edu/notes/cs229-notes1.pdf</a><br /> This lecturer introduces an alternative approach to gradient descent that is called &quot;Normal Equation&quot; and the...
https://ai.stackexchange.com/questions/22401/if-the-normal-equation-works-why-do-we-need-gradient-descent
Question: <p>I am trying to comprehend how the Gradient Descent works.</p> <p>I understand we have a cost function which is defined in terms of the following parameters,</p> <p><span class="math-container">$J(𝑤_{1},𝑤_{2},.... , w_{n}, b)$</span></p> <p>the derivative would tell us which direction to adjust the parame...
https://ai.stackexchange.com/questions/23737/how-parameter-adjustment-works-in-gradient-descent
Question: <p>I'm reading chapter one of the book called <a href="https://dl.uswr.ac.ir/bitstream/Hannan/141305/2/9783319944623.pdf" rel="nofollow noreferrer">Neural Networks and Deep Learning</a> from Aggarwal.</p> <p>In section 1.2.1.1 of the book, I'm learning about the perceptron. One thing that book says is, if we ...
https://ai.stackexchange.com/questions/24261/why-is-the-perceptron-criterion-function-differentiable
Question: <p>Let <span class="math-container">$\sigma(x)$</span> be sigmoid function. Consider the case where <span class="math-container">$\text{out}=\sigma(\vec{x} \times W + \vec{b})$</span>, and we want to compute <span class="math-container">$\frac{\partial{\text{out}}}{\partial{w} }.$</span><br /> Set the dimensi...
https://ai.stackexchange.com/questions/27335/how-can-the-gradient-of-the-weight-be-calculated-in-the-viewpoint-of-matrix-calc
Question: <p>The MSE can be defined as <span class="math-container">$(\hat{y} - y)^2$</span>, which should be equal to <span class="math-container">$(y - \hat{y})^2$</span>, but I think their derivative is different, so I am confused of what derivative will I use for computing my gradient. Can someone explain for me wh...
https://ai.stackexchange.com/questions/12612/which-function-haty-y2-or-y-haty2-should-i-use-to-compute-th
Question: <p>I am reading a book that states</p> <blockquote> <p>As the mini-batch size increases, the gradient computed is closer to the 'true' gradient</p> </blockquote> <p>So, I assume that they are saying that mini-batch training only focuses on decreasing the cost function in a certain 'plane', sacrificing accurac...
https://ai.stackexchange.com/questions/7494/whats-the-rationale-behind-mini-batch-gradient-descent
Question: <p>As simple as that. Is there any scenario where the error might <em>increase</em>, if only by a tiny amount, when using SGD (no momentum)?</p> Answer: <p>Yes. Not only that, but error is highly noisy, prone to big spikes and sometimes quite long period of increase before decrease again or stabilize. Often ...
https://ai.stackexchange.com/questions/13288/is-it-possible-with-stochastic-gradient-descent-for-the-error-to-increase
Question: <p>If I have a neural network, and say the 6th output node of the neural network is:</p> <p><span class="math-container">$$x_6 = w_{16}y_1 + w_{26}y_2 + w_{36}y_3$$</span></p> <p>What does that make the derivative of:</p> <p><span class="math-container">$$\frac{\partial x_6}{\partial w_{26}}$$</span></p> <p>I...
https://ai.stackexchange.com/questions/25522/what-is-the-derivative-of-a-specific-output-with-respect-to-a-specific-weight
Question: <p>Gradient descent can get stuck into local optimum. Which techniques are there to reach global optimum?</p> Answer: <p>In Deep Learning there are several methods to improve "stuck" gradient - decrease learning rate, use cyclic learning rate - cycle it from bigger to smaller value. More radical method is co...
https://ai.stackexchange.com/questions/11729/how-can-we-reach-global-optimum
Question: <p>I am trying to implement a simple 2nd order polynomial gradient descent algorithm in Java. It is not converging and becomes unstable. How do I fix it?</p> <pre><code>public class PolyGradientDescent { public static double getValue(double input) { return 3 * input * input - 4 * input + 3.5; } public ...
https://ai.stackexchange.com/questions/34230/simple-polynomial-gradient-descent-algorithm-not-working
Question: <p>When gradients are aggregated over mini batches, I sometimes see formulations like this, e.g., in the &quot;Deep Learning&quot; book by Goodfellow et al.</p> <p><span class="math-container">$$\mathbf{g} = \frac{1}{m} \nabla_{\mathbf{w}} \left( \sum\limits_{i=1}^{m} L \left( f \left( \mathbf{x}^{(i)}, \math...
https://ai.stackexchange.com/questions/34910/why-would-one-prefer-the-gradient-of-the-sum-rather-than-the-sum-of-the-gradient
Question: <p>The result of gradient descent algorithm is a vector. So how does this algorithm decide the direction for weight change? We Give hyperparameters for step size. But how is the vector direction for weight change, for the purpose of reducing the Loss function in a Linear Regression Model, determined by this a...
https://ai.stackexchange.com/questions/5670/how-is-direction-of-weight-change-determined-by-gradient-descent-algorithm
Question: <p>Imagine that I have an artificial neural network with a single hidden layer and that I am using ReLU as my activating function. If by change I initialize my bias and my weights in such a form that: <span class="math-container">$$ X * W + B &lt; 0 $$</span> for every input <strong>x</strong> in <strong>X</s...
https://ai.stackexchange.com/questions/10158/how-can-a-neural-network-learn-when-the-derivative-of-the-activation-function-is
Question: <p>I am trying to code a two layered neural network simple NN as I have described here <a href="https://itisexplained.com/html/NN/ml/5_codingneuralnetwork/" rel="nofollow noreferrer">https://itisexplained.com/html/NN/ml/5_codingneuralnetwork/</a></p> <p>I am getting stuck on the last step of updating the weig...
https://ai.stackexchange.com/questions/26920/in-gradient-descents-update-rule-why-do-we-use-sigmazl-1-frac-delta-c
Question: <p>Is there a popular diffusion model-based framework for language modelling? If not, is it because of the difficulty sampling for discrete distributions?</p> Answer: <p>The problem with the current diffusion models, is that they are great density models, but they require to know a priori the size of the sam...
https://ai.stackexchange.com/questions/45902/any-popular-diffusion-model-for-language-modeling
Question: <p>Where can I find (more) pre-trained <a href="https://en.wikipedia.org/wiki/Language_model" rel="nofollow noreferrer">language models</a>? I am especially interested in <strong>neural network-based</strong> models for <strong>English and German</strong>.</p> <p>I am aware only of <a href="https://github.co...
https://ai.stackexchange.com/questions/7684/where-can-i-find-pre-trained-language-models-in-english-and-german
Question: <p>I have sentence data in a language that is not widely in use and as such popular LLMs do not support the language. I want to train some language model such that given some question, it is able to respond back in the same language, just as in ChatGPT just with a different language.</p> <p>In such a case, wh...
https://ai.stackexchange.com/questions/43408/publically-available-language-models-that-can-be-used-to-train-arbitrary-languag
Question: <p>In the tutorial <a href="https://www.lyrn.ai/2018/11/07/explained-bert-state-of-the-art-language-model-for-nlp/" rel="nofollow noreferrer">BERT – State of the Art Language Model for NLP</a> the masked language modeling pre-training steps are described as follows:</p> <blockquote> <p>In technical terms, the...
https://ai.stackexchange.com/questions/26284/what-does-the-outputlayer-of-bert-for-masked-language-modelling-look-like
Question: <p>I'm reading OpenAI's new paper &quot;<a href="https://openaipublic.blob.core.windows.net/neuron-explainer/paper/index.html" rel="nofollow noreferrer">Language models can explain neurons in language models</a>&quot; And I can't fully understand the concept of neurons here.</p> <p>Can you please explain it? ...
https://ai.stackexchange.com/questions/40385/what-is-a-neuron-in-large-language-models
Question: <p>I currently learning on Transformers, so check my understanding I tried implementing a small transformer-based language model and compare it to RNN based language model. Here's the code for transformer. I'm using PyTorch inbuilt layer for Transformer Encoder</p> <pre><code>class TransformerLM_1(nn.Module):...
https://ai.stackexchange.com/questions/23809/transformer-language-model-generating-meaningless-text
Question: <p>I read a lot about foundation model and large language model.</p> <p>However, I dont find a clear definition what exactly is a foundation model. Is large language model and foundation model the same thing?</p> Answer: <p>At this point in time, there does not appear to be a really widely-agreed-upon defini...
https://ai.stackexchange.com/questions/36766/is-large-language-model-and-foundation-model-the-same-thing
Question: <p>How were the language models of virtual assistants (Siri, Google Assistant, Alexa, etc.) designed and trained before transformers? What were their architectures?</p> Answer: <p>Before transformers for the <a href="https://en.wikipedia.org/wiki/Natural_language_understanding" rel="nofollow noreferrer">natu...
https://ai.stackexchange.com/questions/47883/language-models-of-virtual-assistants-before-transformers
Question: <p><strong>Problem:</strong><br /> Let's say we want to predict insurance frauds. Whenever we obtain an insurance claim, we are provided with a free-form description detailing the loss and a substantial amount of data on the claimant, presented in a tabular format.</p> <p><strong>Questions:</strong><br /> How...
https://ai.stackexchange.com/questions/39652/large-language-models-vs-tabular-data
Question: <p>Facebook has <a href="https://arxiv.org/pdf/1911.02116.pdf" rel="nofollow noreferrer">just pushed out</a> a bigger version of their multi-lingual language model XLM, called XLM-R. My question is: do these kind of multi-lingual models imply, or even ensure, that their embeddings are comparable between langu...
https://ai.stackexchange.com/questions/16353/are-embeddings-in-multi-lingual-language-models-comparable-across-languages
Question: <p>I have large set of corpus for all literature in 'Tamil' language, i am trying to create a document retrieval engine through simple natural language.</p> <p>Since the corpus is huge, its hard to do a supervised learning, i also checked ai4bharat.org 's initiatives to build the language models, but its stil...
https://ai.stackexchange.com/questions/38706/how-can-i-create-a-new-language-model-for-language-other-than-english
Question: <p>I am trying to use a Keras LSTM neural network for character level language modelling. As the input, I give it the last 50 characters and it has to output the next one. It has 3 layers of 400 neurons each. For the training data, I am using 'War of The Worlds' by H.G. Wells which adds up to 269639 training ...
https://ai.stackexchange.com/questions/9756/lstm-language-model-not-working
Question: <p>Suppose that a mathematician wants to find a proof of a conjecture or understand details of some proof. Can one combine language models like ChatGpt or Copilot and theorem proving software like Coq to and iterate outputs until a proof is found?</p> Answer:
https://ai.stackexchange.com/questions/46225/how-to-combine-language-models-and-theorem-provers
Question: <p>Are there any techniques to combine a feature set (other than the text itself) with pretrained language models.</p> <p>Let's say I have a random NLP task that tries to predict a binary class label based on e.g. Twitter data. One could easily utilize a pretrained language model such as BERT/GPT-3 etc. to fi...
https://ai.stackexchange.com/questions/37026/how-to-combine-pretrained-language-models-with-additional-feature-set
Question: <p>Suppose that we want to generate a sentence made of words according to language <span class="math-container">$L$</span>: <span class="math-container">$$ W_1 W_2 \ldots W_n $$</span></p> <p><strong>Question:</strong> What is the perfect language model?</p> <p>I ask about <em>perfect</em> because I want to k...
https://ai.stackexchange.com/questions/23557/fundamentally-what-is-a-perfect-language-model
Question: <p>Have never trained a (very) large language model, so I am wondering if the process is the same as training a (regular) language model, i.e. you prepare the data, set up the architecture, hyperparameters, loss function to minimize perplexity and predicting the next word, and then do gradient descent over th...
https://ai.stackexchange.com/questions/42131/tips-and-tricks-when-training-a-very-large-language-model
Question: <p>I am self-studying applications of deep learning on the NLP and machine translation.</p> <p>I am confused about the concepts of &quot;Language Model&quot;, &quot;Word Embedding&quot;, &quot;BLEU Score&quot;.</p> <p>It appears to me that a language model is a way to predict the next word given its previous ...
https://ai.stackexchange.com/questions/26739/what-is-the-difference-between-a-language-model-and-a-word-embedding
Question: <p>What are the main differences between a language model and a machine translation model?</p> Answer: <p>The simple language model will give you the probability of a sequence of tokens(sentence) for that language. So lets say if you have trained a model for English language your model can give you the proba...
https://ai.stackexchange.com/questions/22086/what-are-the-main-differences-between-a-language-model-and-a-machine-translation
Question: <p>Hadamard defines (<a href="https://en.wikipedia.org/wiki/Well-posed_problem" rel="nofollow noreferrer">Well-posed problem (Wikipedia)</a>) a well-posed problem as one for which:</p> <ol> <li>a solution exists,</li> <li>the solution is unique,</li> <li>the solution depends continuously on the data (e.g. it ...
https://ai.stackexchange.com/questions/40379/is-the-problem-of-language-modelling-a-well-posed-learning-problem
Question: <p>Most language model is using online PPO or offline DPO type algorithm. Can we use soft actor critic RL to do alignment work? Any publication related can be recommended?</p> Answer: <p>Sample efficient off-policy <a href="https://spinningup.openai.com/en/latest/algorithms/sac.html" rel="nofollow noreferrer...
https://ai.stackexchange.com/questions/46477/can-we-apply-soft-actor-critic-to-language-model-preference-optimization
Question: <p>Large Language Models (LLMs) are currently among the most prominent AI technologies, with some considering them as a step toward Artificial General Intelligence (AGI). My question is: Are there already successful commercial applications of LLMs, and if so, are these models particularly indispensable in the...
https://ai.stackexchange.com/questions/47709/what-are-the-most-successful-applications-of-large-language-models
Question: <p>I have tried training T5-small, T5-base and T5-Large on around 15K rows of data where input data was something like but I did not get desired results</p> <pre><code>Nutrition Facts, 100g per, Energy 646.95Kcal Carbohydrates 19.31g, Protein 21.94g 53.55g Total Fat 6.64g Saturated Fat 14.97g Dietary Fiber, ...
https://ai.stackexchange.com/questions/43843/what-language-model-can-convert-normal-text-to-json-data
Question: <p>I read on <a href="https://developer.android.com/ai/gemini-nano" rel="nofollow noreferrer">https://developer.android.com/ai/gemini-nano</a> about the use of local language models on Android:</p> <blockquote> <ul> <li><strong>Supported Devices</strong>: AICore is currently available on Pixel 9 series device...
https://ai.stackexchange.com/questions/47748/do-all-android-devices-use-the-same-foundation-language-model-and-lora-adapters
Question: <p>I am new to nlp field. I have some questions about word2vec embeddings. as I know they have a fixed size dictionary of vocabs. so definitely there some words which is not in that predefined dictionary of vocab, for i.e. we may get an special name (like people's name) which doesn't exist in the vocab and th...
https://ai.stackexchange.com/questions/41823/how-word2vec-de-embeds-the-special-names-in-language-models-which-output-text
Question: <p>I’m thinking of fine-tuning a pre-trained language model for a Q&amp;A task. More specifically, I’d like to fine-tune the model on a single chapter in a classic college textbook. Afterward, the reader of the chapter should be able to engage in a Q&amp;A session with the model about the content of the chapt...
https://ai.stackexchange.com/questions/36812/can-you-make-qa-language-model-stay-on-topic
Question: <p>You may have heard of GPT2, a new language model. It has recently attracted attention from the general public as the foundation that published the paper, <a href="https://blog.openai.com/better-language-models/" rel="nofollow noreferrer">OpenAI</a>, ironically refused to share the whole model fearing dange...
https://ai.stackexchange.com/questions/10869/how-do-we-know-if-gpt-2-is-a-better-language-model
Question: <p>I have a very outdated idea about how NLP tasks are carried out by normal RNN's, LSTM's/GRU's, word2vec, etc to basically generate some hidden form of the sentence understood by the machine.</p> <p>One of the things I have noticed is that, in general, researchers are interested in generating the context of...
https://ai.stackexchange.com/questions/13600/why-do-language-models-place-less-importance-on-punctuation
Question: <p>How do you build a language model to predict the contextual similarity between two documents?</p> Answer: <p>You can use an autoencoder for text. For example, you can refer to this example here: <a href="https://machinelearningmastery.com/lstm-autoencoders/" rel="nofollow noreferrer">https://machinelearni...
https://ai.stackexchange.com/questions/16328/how-do-you-build-a-language-model-to-predict-the-contextual-similarity-between-t
Question: <p>I have a trained LSTM language model and want to use it to generate text. The standard approach for this seems to be:</p> <ol> <li>Apply softmax function</li> <li>Take a weighted random choice to determine the next word</li> </ol> <p>This is working reasonably well for me, but it would be nice to play arou...
https://ai.stackexchange.com/questions/25270/are-there-any-good-alternatives-to-an-lstm-language-model-for-text-generation
Question: <p>Example: Suppose a character-level language model (three input letters to predict the next one), trained on a dataset which contains three instances of the sequence <code>aei</code>, with two occurrences preceding <code>o</code> and one preceding <code>u</code>, i.e., the dataset is:</p> <div class="s-tabl...
https://ai.stackexchange.com/questions/42495/what-is-the-lowest-possible-loss-for-a-language-model
Question: <p>I'm reading <em>"<a href="http://www.fit.vutbr.cz/research/groups/speech/publi/2010/mikolov_interspeech2010_IS100722.pdf" rel="nofollow noreferrer">Recurrent neural network based language model</a>"</em> of Mikolov et al. (2010). Although the article is straight forward, I'm not sure how word embedding <sp...
https://ai.stackexchange.com/questions/5285/how-is-the-word-embedding-represented-in-the-paper-recurrent-neural-network-bas
Question: <p>I want to know what things I should be learning before trying to fine-tune or for that matter working with a large language model.</p> <p>In my case, I am trying to fine-tune bloom (<a href="https://huggingface.co/blog/bloom" rel="nofollow noreferrer">https://huggingface.co/blog/bloom</a>).</p> <p>But cons...
https://ai.stackexchange.com/questions/39078/what-background-should-i-have-before-starting-to-fine-tune-a-large-language-mode
Question: <p>Epistemic uncertainty is uncertainty that arises from a lack of knowledge, for instance in machine learning epistemic uncertainty can be caused by a lack of training data. Estimating epistemic uncertainty is important for useful AI systems, since it allows the AI to &quot;know that it doesn't know&quot;, t...
https://ai.stackexchange.com/questions/48038/what-are-the-leading-methods-to-estimate-epistemic-uncertainty-in-large-language
Question: <p>One of the biggest strengths of ChatGPT is that it generates fitting text with respect to the input query. It usually stays on topic, anwers the question completely and especially does not start talking gibberish or repeating itself.</p> <p>This behaviour is different when comparing this to older LLMs. For...
https://ai.stackexchange.com/questions/42140/why-do-current-language-models-no-longer-generate-to-long-or-short-texts
Question: <p>I've recently been looking into language models but ran into a small question out of curiosity. For some language models like GPT-3, it is possible to generate dialogue, with the model basing its answers on the initial input (which can be anything). This makes it possible to make a &quot;bot&quot; which a ...
https://ai.stackexchange.com/questions/34040/are-there-any-other-language-models-besides-gpt-3-that-can-be-used-to-create-cha
Question: <p>Prompt injection attacks are typically described as adversarial inputs crafted to override or manipulate a language model’s behavior by exploiting its prompt - following nature. In many examples, these attacks rely on the presence of predefined system instructions (e.g., &quot;You are a helpful assistant. ...
https://ai.stackexchange.com/questions/48597/can-a-prompt-injection-attack-exist-without-predefined-system-instructions-in-a
Question: <p>Which framework should I use for training transformer language models with reinforcement learning (e.g., GRPO)? Any recommendation?</p> <div class="s-table-container"><table class="s-table"> <thead> <tr> <th style="text-align: left;">Feature</th> <th style="text-align: left;"><a href="https://github.com/hu...
https://ai.stackexchange.com/questions/48596/which-framework-should-i-use-for-training-transformer-language-models-with-reinf
Question: <p>If I'm using the same datasets and using different language models, such as BERT, DistilBERT, Electra, etc., and my goal to compare the performance, such as the accuracy, macro f score, etc. should I used the same learning rate and number of epochs to make comparison fair, or is it allowed to have differe...
https://ai.stackexchange.com/questions/47254/should-i-use-the-same-learning-rate-when-i-compare-the-performance-for-different
Question: <p>E.g. Finetuning a language model using text from Wikipedia articles (without modifications) when the language model has Wikipedia data in its training dataset will cause the model to reproduce the articles' texts verbatim in its output? Assuming the model is small (less than 3 billion parameters) and has v...
https://ai.stackexchange.com/questions/48410/can-the-output-of-a-language-model-be-identical-to-its-training-data-if-finetun
Question: <p>I want to learn how a set of operations (my vocabulary) are composed in a dataset of algorithms (corpus). </p> <p>The algorithms are a sequence of higher level operations which have varying low-level implementations. I am able to map raw code to my vocabulary, but not all of it.</p> <p>e.g. I observe a l...
https://ai.stackexchange.com/questions/13518/language-model-from-missing-data
Question: <p>Suppose we have a tree/hierarchy of categories (e.g. categories of products in an e-commerce website), each node being assigned a title. Assume that the title of each node is semantically accurate, meaning it's consistent with the category (the titles of the children nodes) it represents. Now, take an enco...
https://ai.stackexchange.com/questions/46252/normalizing-the-embedding-space-of-an-encoder-language-model-with-respect-to-cat
Question: <p>I have seen a number of ways to train (yes, train, not fine-tune) these models efficiently with batches. I will illustrate these techniques with the following example dataset and context window:</p> <pre><code>Context window: ----------------- Data samples: 1. ### 2. ################ 3. #### 4. ########...
https://ai.stackexchange.com/questions/39817/whats-the-most-efficient-way-of-performing-batched-training-of-causal-language
Question: <p>Again and again I ask myself what goes on in a pre-trained transformer-based language model (like ChatGPT9) when it comes to &quot;know&quot; that it cannot give an appropriate answer and either</p> <ul> <li><p>states it (&quot;I have not enough information to answer this question.&quot;)</p> </li> <li><p>...
https://ai.stackexchange.com/questions/40874/how-do-language-models-know-what-they-dont-know-and-report-it
Question: <p>I want to discuss an interesting matching problem. We aim to match sample requests with corresponding sample offers. Here are some examples:</p> <p>Sample Requests:</p> <p>Need help installing Linux on my old laptop. Looking for a tutor in specialist mathematics. Need a second person to help assemble an Ik...
https://ai.stackexchange.com/questions/46052/efficient-matching-of-sample-requests-to-sample-offers-using-large-language-mode
Question: <h3>Background</h3> <p>I'm an undergraduate student with research interests in a field of physics that has significant overlap with graph theory, and a functioning knowledge of how simple neural nets work and how to build them with TensorFlow and Keras. As many people are, I'm fascinated by the recent advance...
https://ai.stackexchange.com/questions/41921/how-can-i-improve-this-toy-graph-neural-network-generative-language-model
Question: <p>I am reading the paper &quot;Large Language Models Can Self-Improve&quot; <a href="https://arxiv.org/abs/2210.11610" rel="nofollow noreferrer">https://arxiv.org/abs/2210.11610</a> in which the authors consider that LLM can generate Chain-of-Thoughts sequences and even novel questions and their respective C...
https://ai.stackexchange.com/questions/37827/how-can-pretrained-language-models-actively-seek-additional-training-data-po
Question: <p>One of the main criticisms against the use of ChatGPT on Stack Exchange is that it doesn't attribute the main knowledge/sources used to generate a given output. How can a language model keep track of the provenance of the main knowledge/sources used to generate a given output?</p> Answer: <p>Reddit user <...
https://ai.stackexchange.com/questions/38372/how-can-a-language-model-keep-track-of-the-provenance-of-the-main-knowledge-sour
Question: <p>Does anyone know of research involving the GPT models to learn not only regular texts, but also learn from physics books with the equations written in latex format?</p> <p>My intuition is that the model might learn the rules relating equations and deductions, as they can learn statistically what correlates...
https://ai.stackexchange.com/questions/23418/can-in-principle-gpt-language-models-learn-physics
Question: <p>looking for some ideas to accurately extract data flows from system context diagram. I've tried a number of models and prompt engineering techniques, but i'm still getting missing flows, and hallucination from the model on non-existing flows, incorrect data flow.</p> <p><strong>what i've tried:</strong></p...
https://ai.stackexchange.com/questions/47707/data-extraction-from-diagrams-using-vision-language-model
Question: <p>I am using some of the LLM applications, and all of them are better at provide formal, steady conversations, rather than writing texts with styles. So I wonder whether it is possible to train a LLM better at writing poem, or other stylish texts in general.</p> <p>Is this resulted from the dataset or the mo...
https://ai.stackexchange.com/questions/41936/how-to-train-a-language-model-to-write-poem
Question: <p>It seems like transfer learning is only applicable to neural networks. Is this a correct assumption?</p> <p>While I was looking for examples of Transfer Learning, most seemed to be based on image data, audio data, or text data. I was not able to find an example of training a neural network on numerical dat...
https://ai.stackexchange.com/questions/24136/transfer-learning-of-numerical-data
Question: <p>Transfer learning consists of taking features learned on one problem and leveraging them on a new, similar problem.</p> <p>In the Transfer Learning, we take layers from a previously trained model and freeze them.</p> <p><strong>Why is this layer freezing required and what are the effects of layer freezing?...
https://ai.stackexchange.com/questions/22963/what-is-layer-freezing-in-transfer-learning
Question: <p>I am new to transfer learning and I start by reading <a href="https://ieeexplore.ieee.org/document/5288526" rel="nofollow noreferrer">A Survey on Transfer Learning</a>, and it stated the following:</p> <blockquote> <p>according to different situations of labeled and unlabeled data in the source domain, we ...
https://ai.stackexchange.com/questions/27136/what-is-the-relation-between-self-taught-learning-and-transfer-learning
Question: <p>To my understanding, transfer learning helps to incorporate data from other related datasets and achieve the task with less labelled data (maybe in 100s of images per category).</p> <p>Few-shot learning seems to do the same, with maybe 5-20 images per category. Is that the only difference?</p> <p>In both c...
https://ai.stackexchange.com/questions/25615/how-is-few-shot-learning-different-from-transfer-learning
Question: <p>What are the differences between meta-learning and transfer learning?</p> <p>I have read 2 articles on <a href="https://qr.ae/Tdowsi" rel="noreferrer">Quora</a> and <a href="https://towardsdatascience.com/icml-2018-advances-in-transfer-multitask-and-semi-supervised-learning-2a15ef7208ec" rel="noreferrer">...
https://ai.stackexchange.com/questions/18232/what-are-the-differences-between-transfer-learning-and-meta-learning
Question: <p>I am working on Contrastive learning which is a technique to learn features based on the concept of learning from comparing two or more instances.</p> <p>The downstream task is a classification problem.</p> <p><strong>Transfer Learning</strong> Due to limited data, I tried to use Transfer learning model tr...
https://ai.stackexchange.com/questions/35738/embedding-quality-of-transfer-learning-model-vs-contrastive-learning-model
Question: <p>There are many types of CNN architectures: LeNet, AlexNet, VGG, GoogLeNet, ResNet, etc. Can we apply transfer learning between any two different CNN architectures? For instance, can we apply transfer learning from AlexNet to GoogLeNet, etc.? Or even just from a &quot;conventional&quot; CNN to one of these ...
https://ai.stackexchange.com/questions/23672/can-we-apply-transfer-learning-between-any-two-different-cnn-architectures
Question: <p>What are the real-life applications of transfer learning in machine learning? I am particularly interested in industrial applications of the concept.</p> Answer: <p>One application I know of being used in industry is of image classification, by only training the last layer of one of the inception models r...
https://ai.stackexchange.com/questions/15731/what-are-the-real-life-applications-of-transfer-learning
Question: <p>I am using MobileNetV3 from TF keras for doing transfer learning; I removed the last layer, added two dense layers, and trained for 20 epochs.</p> <ol> <li><p>How many dense layers should I add after the MobileNet and How dense should they be?</p> </li> <li><p>How many epochs should I train for?</p> </li> ...
https://ai.stackexchange.com/questions/28156/validation-accuracy-very-low-with-transfer-learning
Question: <p>In transfer learning, we use big data from similar tasks to learn the parameters of a neural network, and then fine-tune the neural network on our own task that has little data available for it. Here, we can think of the transfer learning step as learning a (proper) prior, and then fine-tuning as learning ...
https://ai.stackexchange.com/questions/28549/how-could-bayesian-neural-networks-be-used-for-transfer-learning
Question: <p>I have two datasets, Dataset 1(D1) and Dataset 2(D2). D1 has around 22000 samples, and D2 has around 8000 samples. What I am doing is that I train a Deep Neural Network model with around three layers on the dataset D1, which has an accuracy of around 84% (test accuracy = 82%).</p> <p>Now, when I use that m...
https://ai.stackexchange.com/questions/28247/would-this-count-as-a-transfer-learning-approach
Question: <p>I would like to incrementally train my model with my current dataset and <a href="https://github.com/tensorflow/models/issues/7200#issuecomment-510850230" rel="nofollow noreferrer">I asked this question on Github</a>, which is what I'm using SSD MobileNet v1.</p> <p>Someone there told me about <a href="htt...
https://ai.stackexchange.com/questions/13644/what-is-the-difference-between-learning-without-forgetting-and-transfer-learning