text:
Equivalent of bivariate Fourier series with polynomial denominator
My goal is to have an equivalent, as $t\to \infty$, of
$$\sum_{m\in \mathbb{Z}^2,m\neq 0}\frac{1}{\|m\|^\alpha}\exp(im\cdot u/t)\exp(-(m/t)^2)$$ for $u\in \mathbb{R}^2$.
Does anyone recognize something? I am overall interested by the case $\alpha=2$.
I tried the Poisson summation formula but the involved function is not integrable so the result does not make any sense (to me). I am equivalently interested by teplacing the Gauss kernel with a truncation at $m=t$ .
Another successful approach would be to understand the behaviour of
$$\sum_{m\in \mathbb{Z}^2,m\neq 0}\frac{1}{\|m\|^2}\exp(im\cdot u)$$ for small $u$, but then one has still to understand the error wrt the first sum.
They don't seem like such unlikely expressions to occur, but I have scrolled some book of "special functions" with many ugly expressions but never found something under this form. Any clue regarding one of these expressions will definitely help me!


text:
Why is the feature direction chosen in the direction associated with largest eigenvalue of $\Sigma_T$ in case of more than two classes?
Why is the feature direction chosen in the direction associated with largest eigenvalue of  $\Sigma_T$ in case of more than two classes? Please see the following.

What's the context of this information? What algorithm is it describing?

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Convert specific domain knowledge text to a knowledge graph

As part of this semester assignment , I'm working on a project that aims to to represent the knowledge in "PMBOK 6th edition, section 11: Project Risk Management (page 395 -> 458)"  and the knowledge in "PMI standard for Risk Management " (128 pages) as a knowledge graph. The generated knowledge graph will be used later to build recommendation system to infer real-time personalized recommendations.
I have been reading on how to convert unstructured text into a knowledge graph  in research papers and  articles and I have found mainly 3 ways to do this:
1/ Using a joint of  Named-entity recognition (NER) and Relation Extraction (RE) to extract the entities and the relations from your unstructured text.
2/ taking advantage of the linguistic knowledge of Transformer models and fine tune a transformer model (BERT, T5)  for the task of extracting entities and relations. I could find some pretrained models like REBEL :https://github.com/Babelscape/rebel.
3/ use prompt engineering  (LLM (GPT)) to generate the knowledge graph.
I could not find any of the three approaches as good as I wanted:
1/ The majority of the resources I have found that tackles the first approach (NER & RE)  showcase simple tasks where the named entities and  relations are very straightforward. Example this article here: https://freedium.cfd/https://medium.com/mlearning-ai/building-a-knowledge-graph-for-job-search-using-bert-transformer-8677c8b3a2e7  where the entities are [skills, Diploma, Major, Year of experience] and the relations [DEGREE_IN, EXPERIENCE_IN..]. In this case, training  NER and RE models will be easy. But in my case, determining entities and relations is very complex. Annotating the corpus manually is incredibly tedious and labor-intensive (Could not even determine what are the entities and the relations) . You can grab a feeling of how complex it is by looking at how big our dataset is (191 pages of knowledge) and how complex the knowledge is in the corpus (many definitions, a lot of terminology...)
2/ I have used the pretrained REBEL model but  the results looked weird. (redundant relations, sometimes the extracted relations make non sense). And So I wanted to fine tune BERT for this specific task on my custom data (PMBOK, PMI) but I really could not understand how to do this   (what should be the data format to train and test the transformer model?, how to evaluate the model ?...)
3/ The fact that LLM are stochastic models,  a lot of variations in the generated graphs for each prompt (sometimes huge differences)  and this lead to huge ambiguity because I cannot evaluate how good the graph is in representing the knowledge.
I'm open to any  other resources and any other inspirations or approaches to tackle this project. Thank you in advance.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
autoencoders for anomaly detection, training individual models for different users or roles, how?
Do I first train a generic model for all of my users on a network, say for a network anomaly detection example, then fine tune for each user on their own subset of the training data?  But I'd be using that training data twice then and not sure if that's going to do it or train the generic user, then get a bit more data by letting time elapse and collecting telemetry on the network then fine tune for users on the newly collected data?  The final option would be to just train on individual user data from scratch without any generic user model to fine tune.


text:
How to use deep learning to train an AI to play a two-player tactic game like rock-papers-scissors?
I want to try to train an AI model that can play a simple two-player tactic game. The game is not rock-papers-scissors, but have similar properties.

Firstly, two players present their moves simultaniously, and it's not turn based. So this artical discussing step-based games like tic-tac-toe doesn't help. The minimax algorithm cannot work in this condition.
Secondly, to each different play the computer faces, their should be a different winning tactic. I would like to train the AI model to let it learn effectively to the opponent's tactics. Consider this article on rock-papers-scissors: At the beginning of the article, there is an interactive presentation of how the AI model performs. It seems that after winning the AI easily a few times, the AI seems to develop a good sense of predicting what move will the opponent come up next. I hope the AI trained on this game should behave like this too.

The biggest difference between this game and rock-papers-scissors is that there are no core stategies that the AI can follow, and the games does not end on the first round. So the AI needs to develop a stategy itself to face the opponent and maximize its chances of winning. How do I achieve this goal? I'm not an expert in machine learning or deep learning, so please make the explanation simple. I don't need much code, just guidance on how to program and train this AI.


text:
Why are thresholds in NN so important?
I am working on a paper on the approximation properties of NN. One part of this topic is of course the universal approximation theorem (UAT), which gets discussed in various papers with different properties for the activation function.
In the paper "Multilayer Feedforward Networks With a Nonpolynomial
Activation Function Can Approximate Any Function" by Leshno, they mention the importance of thresholds and follow that you don't need a continuous or smooth activation function for a universal approximator, because other papers already have proven the density of $span\{f(a \cdot x) : \mathbb{R}^d \to  \mathbb{R} \ | \ a \in \mathbb{R}^d, f \in C(\mathbb{R})\}$ in $C(\mathbb{R^d})$ and in there version of the UAT the activation function $\varrho$ just needs to be not a polynomial (also essentially bounded and almost everywhere continuous, but they seem to ignore this in their reasoning).
I understand that  for the UAT I just need one function for density, instead of all continuous functions as in the density result described, and the activation function is also  just almost everywhere continuous, but has maybe someone some ideas or inputs why the threshold is so important?
Note: My definition of a 2-layered NN, with the architecture $((d,n, 1 ), \varrho)$, meaning we have $d$ inputs, $n$ hidden units and $1$ output, is $\mathcal{F}_{((d,n, 1 ), \varrho)}=\{\sum_{i=1}^n a_i\varrho(w_i\cdot x+b_i) + c_i \ | \ b_i, c_i \in \mathbb{R} \text{
and } w_i \in \mathbb{R}^d\}$. In this instance the $b_i$ are the thresholds.

what are you referring to when you say “threshold”?

It is also called bias. I am going to include a definition of them in the post.

It's hard to know how to answer this without elaboration on the sense in which the thresholds are "important." Important for what? But perhaps you have overlooked that you can absorb the $b_i$ in $w_i$ if all $x$ contain a constant $1$.

Yeah, but it still acts like a threshold. I have an example to explain what I mean a bit better: Consider the activation function $f(x)=sin(x)$, then the hypothesis set, not considering thresholds, ${sin(ax) : a \in \mathbb{R}}$, only consists of odd functions. (For simplicity reasons we only consider networks with 1 input, 1 neuron in hidden layer, 1 output) Then there is no way to approximate an even function, like the Cosine. Only if we add a bias, in this case $b=\pi/2$.

Just to clarify I asked this question, because maybe someone has some knowledge about thresholds or examples, so I gain some more insight.


text:
What is the reason that OpenAI implements complex context management in ChatGPT but does not use it for their API?
According to this discussion
How does ChatGPT retain the context of previous questions?
it is clear that OpenAI already has implemented some serious engineer to ensure that the ChatGPT experience is a great one by enabling ChatGPT to have very good context management. In order words, ChatGPT can recall things long past it's token limit (much earlier in the conversation).
However, this function does not exists in the API. Why is that? I know we that we cannot know for sure what the proprietary reasons are, but what are some good theories?

I’m voting to close this question because it's a question about a company's policy.


text:
What are some good pairs of transfer learning source and target datasets for image classification?
As the title says, I'm curious about some well used transfer learning tasks.
ImageNet to other datasets is common, but what are something good pairs I can try and mess around with ?
Like CIFAR10 to MNIST, or CIFAR10 to CIFAR100, or CIFAR10 to SVHN.
While ImageNet is 224x224, and some of the above ones are 32x32, I also want to look at 64x64(like TinyImageNet)
As the title says, I'm curious about some well used transfer learning tasks.
ImageNet to other datasets is common, but what are something good pairs I can try and mess around with ?
Like CIFAR10 to MNIST, or CIFAR10 to CIFAR100, or CIFAR10 to SVHN.
While ImageNet is 224x224, and some of the above ones are 32x32, I also want to look at 64x64(like TinyImageNet)
P.S : I know that transfer learning is mainly used for situation where the target dataset is quite small, but I want to use some standard popular datasets and see how things work


text:
Multi-Agent DQN not learning for Clean Up Game - Reward slowly decreasing
The environment of the Clean Up game is simple: in a 25*18 grid world, there's dirt spawning on the left side and apples spawning on the other. Agents get a +1 reward for eating an apple (by stepping onto it). Agents clean the dirt also by stepping on it (no reward). Agent can go up, down, left, right. The game goes on for 1000 steps. Apple's spawn probability depends on the amount of dirt (less dirt, higher the probability). Currently, the observation for each agent has the manhatten distance to their closest apple and dirt.
I have tried multiple ways of training this, including changing the observation space of the agents. But it seems the result does not outperform random agents by any significant amount.
The network is simple, it tries to take in all the observations for all the agents and give the reward predictions for each action for all agents:
def simple_model():
    input = Input(shape=(num_agents_cleanup, 8))
    flat_state = Flatten()(input)

    layer1 = Dense(512, activation = 'linear')(flat_state)

    layer2 = Dense(256, activation = 'linear')(layer1)
    layer3 = Dense(64, activation="relu")(layer2)
    actions = Dense(4*num_agents_cleanup, activation="linear")(layer3)
    action = Reshape((num_agents_cleanup, 4))(actions)
    return Model(inputs=input, outputs=action)

I haven't had much experience and trying to learn MARL so there could be some fundamental mistakes here. Anyways the training mainly look like this:
batch_size = 32
for i_episode in range(num_episodes):
    states, _ = env_qd.reset()
    eps *= eps_decay_factor
    terminate = False
    num_agents = len(states)
    mem = []  # memorize the steps
    while not terminate:
        # env_qd.render()
        actions = {}
        comb_state = []
        for i in range(num_agents_cleanup):
            comb_state.append(states[str(i)])  # combine the states for all agents
        comb_state = np.array(comb_state)
        a = model_simple.predict(comb_state.reshape(1, num_agents_cleanup, 8), verbose=0)[0]
        for i in range(num_agents):
            if np.random.random() < eps:
                actions[str(i)] = np.random.randint(0, env_qd.action_space.n)
            else:
                actions[str(i)] = np.argmax(a[i])
        new_states, rewards, done, _, _ = env_qd.step(actions)
        new_comb_state = []
        for i in range(num_agents_cleanup):
            new_comb_state.append(new_states[str(i)])  # combined new state
        new_comb_state = np.array(new_comb_state)
        new_pred = model_simple.predict(new_comb_state.reshape(1, num_agents_cleanup, 8), verbose=0)[0]
        target_vector = a

        for i in range(num_agents):
            target = rewards[str(i)] + discount_factor * np.max(new_pred[i])
            target_vector[i][actions[str(i)]] = target
        mem.append((comb_state, target_vector))
        states = new_states
        terminate = done["__all__"]
    for i in range(35):
        minibatch = random.sample(mem, batch_size)  # trying to do experience replay
        state_batch = []
        target_batch = []
        for i in range(len(minibatch)):
            state_batch.append(minibatch[i][0])
            target_batch.append(minibatch[i][1])
        model_simple.fit(
        np.array(state_batch).reshape(batch_size, num_agents_cleanup, 8),
        np.array(target_batch).reshape(batch_size, num_agents_cleanup, 4),
        epochs=1, verbose=0)

The training would start to learn something at first (it seems), but then slowing "converge" to a very low reward.
Hyperparameters:
discount_factor = 0.99
eps = 0.3
eps_decay_factor = 0.99
num_episodes=500

Is there any glaring mistake that I made in the training process?
Is there a good way to define the agents' observations?
Thank you!


text:
RAM usage increases linearly while training. What could be causing the issue?
I'm training a siamese neural network with semi-hard batching, RAM usage increases linearly over epochs, peaking at 60GB, then switches from GPU to CPU, slowing down training. I'm using Windows with an Ubuntu VM via Docker and Jupiter notebooks.
RAM issue persists in Docker even with reduced batch size on RTX 4090.

Hyperparams
batch_size = 16
epochs = 10
steps_per_epoch = int(x_train.shape[0]/batch_size)
val_steps = int(x_test.shape[0]/batch_size)
alpha = 0.2
num_hard = int(batch_size * 0.5) # Number of semi-hard triplet examples in the batch
lr = 0.00006
optimiser = 'Adam'
emb_size = 10

Hard Batch Creator
def create_hard_batch(batch_size, num_hard, split="train"):

    # Adjust for color images: width x height x depth
    x_anchors = np.zeros((batch_size, x_train_w, x_train_h, x_train_d))
    x_positives = np.zeros((batch_size, x_train_w, x_train_h, x_train_d))
    x_negatives = np.zeros((batch_size, x_train_w, x_train_h, x_train_d))

    if split == "train":
        data = x_train
        data_y = y_train
    else:
        data = x_test
        data_y = y_test

    # Generate num_hard number of hard examples:
    hard_batches = []
    batch_losses = []

    rand_batches = []

    # Get some random batches
    for i in range(0, batch_size):
        hard_batches.append(create_batch(1, split))  # Adjusted create_batch function for color images

        A_emb = embedding_model.predict(hard_batches[i][0])
        P_emb = embedding_model.predict(hard_batches[i][1])
        N_emb = embedding_model.predict(hard_batches[i][2])

        # Compute d(A, P) - d(A, N) for each selected batch
        batch_losses.append(np.sum(np.square(A_emb-P_emb),axis=1) - np.sum(np.square(A_emb-N_emb),axis=1))

    # Sort batch_loss by distance, highest first, and keep num_hard of them
    hard_batch_selections = [x for _, x in sorted(zip(batch_losses,hard_batches), key=lambda x: x[0])]
    hard_batches = hard_batch_selections[:num_hard]

    # Get batch_size - num_hard number of random examples
    num_rand = batch_size - num_hard
    for i in range(0, num_rand):
        rand_batch = create_batch(1, split)  # Adjusted create_batch function for color images
        rand_batches.append(rand_batch)

    selections = hard_batches + rand_batches

    for i in range(0, len(selections)):
        x_anchors[i] = selections[i][0]
        x_positives[i] = selections[i][1]
        x_negatives[i] = selections[i][2]

    return [x_anchors, x_positives, x_negatives]

Data Generator
def data_generator(batch_size=16, num_hard=50, split="train"):
    while True:
        x = create_hard_batch(batch_size, num_hard, split)
        y = np.zeros((batch_size, 3*emb_size))
        yield x, y

Training Function
siamese_history = siamese_net.fit_generator(
    data_generator(batch_size, num_hard),
    steps_per_epoch=steps_per_epoch,
    epochs=epochs,
    verbose=1,
    callbacks=callbacks,
    workers=0,
    validation_data=data_generator(batch_size, num_hard, split="test"),
    validation_steps=val_steps);

RAM issue persists even with reduced batch size on RTX 4090.
Tried siamese_net.fit_generator() instead of siamese_net.fit(), no change.

You need to determine if the memory leak is in the data function or the fit function. Remove the fit process and just iterate over the data generator for the desired number of batches/epochs.


text:
Feeding variable length of 2D image slices of the MRI into the deep neural network
I am trying to build a classifier that would predict the correct outcome (disease vs healthy) using a set of 2D slices derived from the 3D MRI scan. For each patient, based on the 3D scan, I am able to generate the set of slices and then I pick only those that contain region of interest, as a result the number of slices (2D images) vary across the patients - one may have 20 images whereas another 30.
How can I get away with such variable size of the input, given they are non-independent images? Should I be using some RNN as the first part of the architecture where padding/masking could be used? Is anyone aware of some similar works that have been done?
Many thanks, Oleg
P.S. I have searched for papers where similar architectures would be implemented but couldn't find any


text:
New input to NEAT not improving learning
I have a set of NEAT inputs for a jump game but the learning was getting stuck at one point. Consider the following screen where Z is the player and X/Y form the things we need to jump over:
                          XXXXXX
                           YYYY
                           YYYY
          XXXXXX           YYYY
           YYYY            YYYY
Z__________YYYY_________(z)YYYY_____

The (z) is the highest fitness I ever get to (fitness being how far to the right you get in the game). This is because the only way to get on to the second tower is to jump while on the top of the first, and no organism ever seems to figure this out. Every organism that drops to ground level after the first tower can never get over the second tower (going left back to the first tower is not one of my allowed actions).
I thought it would be enough to just add the height of the next tower as an input so that it could affect the evolution possibilities for the next generation but still no organism seems to figure it out.
I'll provide any parameters requested if you think they're important, I just assumed that adding the tower height would allow evolution to take that into account. I'm not sure which ones will be important, nor any of the config items such as population size, mutation rate, and so on.
What is the best approach to fixing this issue?


text:
What model does use the GenerativeFill site?
It looks like it is more powerful than DALL-E 3! It also allows negative prompts.
I mean this website: https://generativefill.com

Do you mean Adobe's generative fill in Photoshop? You should give more details - e.g. links - and explain why you think it is "more powerful". What does the model do that DALL-E 3 does not do, or in what way are the results better in your opinion?

@NeilSlater I've added a link. The results are more realistic.

There is no information available it seems. I would not currently trust this website with your contact details or money. On https://generativefill.io/page/contact-us they give a US headquarters address which does not appear to exist, and their phone numbers are Swedish. It may not be a scam, but something seems off to me

@NeilSlater yes, and also the tabs "Free AI Canvas", "AI Image Generator" and "Free AI Generator" seem to have the same effect. On the other hand, the quality is very good, like of Midjourney. It is free and seemingly unlimited.

I'd guess at a (maybe tuned) SDXL model. Another sus thing - the "recent" images in the gallery don't change, and the most recent one is 3 days ago. At best these guys are very new and not ready yet, which means I will double down on this not being some brand new model.

@NeilSlater is there a way to test, what model it is?

@NeilSlater it is even better than BlueWillow.

As far as I know, there is no way to tell what model it is except via experience with a range of results. In addition the site could add pre- and post- processing, and be using custom tuned or mixed models (SDXL toolkit allows you to merge models and create useful hybrids). I would still suspect SDXL here, because it is freely available, with lots of supporting scripts, so a really small unknown company could set it up provided they could pay the rental for a few GPU servers in the cloud.


text:
How does a zero-order hold kernel in a Convolutional Neural Network look like?
Several papers co-authored by Hitoshi Kiya propose to use a fixed convolutional layer with a zero-order hold kernel to avoid checkerboard artifacts in CNNs. [1, 2, 3]
While there is plenty of literature regarding the zero-order hold model in 1D signal processing I haven't been able to find anything regarding zero-order hold in image processing, especially in the context of a convolutional neural network layer.
The publication [1] proposes in equation (6)
$K^{(d)}_{i,i,:,:}=\begin{cases}
h_0 & (d=0)\\
K^{(d-1)}_{i,i,:,:} * h_0 & (d>1)
\end{cases}$
to convolve the zero-order hold kernel $h _0$  multiple times to obtain a smoothed kernel. Therefore I assume it must be a regular convolutional kernel?
How would such a kernel look like for a transposed convolutional layer with an upsampling rate of 2?
References:

Fixed smooth convolutional layer for avoiding checkerboard artifacts in CNNs
Super-Resolution using Convolutional Neural Networks without Any Checkerboard Artifacts
Checkerboard-Artifact-Free Image-Enhancement Network Considering Local and Global Features


text:
What is $D_i$ in "Common Principal Components Analysis"?
The following is from Ethem Alpaydin, "Introduction to Machine Learning", Fourth Edition, MIT Press, 2020, page 129.

Here, $C$ is the orthogonal matrix found from the sample covariance of all matrices (S).
But I did not understand what $D_i$ is and why we should have the above relation.
Moreover, why does it allow pooling data?


text:
Building an algorithm that detects an area delimited by a quadrat
I want to build an algorithm that takes an image and outputs the same image, but cropped so that it focuses only on a particular area delimited by a quadrat, like so:

This is not my image as I am not allowed to share my dataset. In my images, quadrats are made with different means (for example with wooden frame, or just measuring tape shaped to make a square).
I do not need a precise cropping. I just need the image to roughly follow the boundaries of the quadrat. But the difficulty comes from the fact that my dataset is heterogeneous and quadrats often not easy to see (they may be partially hidden by the grass, or have an approximative shape in the case of measuring tape).
My first idea was to build object detection algorithm and use the bounding boxes. I tried the one from LandingLens as a first try, which gave promising results, but I need to build one locally and have no idea which architecture they use. So I tried building a DETR network which does not seem to work. I also tried looking at deep learning based edge detection, which I might try but does not seem to be the perfect solution either.
Would you have suggestions or experiences about this particular type of task ?
Thank you


text:
Why is k=1 in linear discriminant analysis for two classes?
With two classes, why does Linear Discriminant Analysis (LDA) consider only
projecting onto one dimension (k=1)? Normally, even with 2 classes, you can consider
projecting the d-dimensional original feature vector onto any k-dimensional space.


text:
Are "Custom Instructions" injected into the context window repeatedly?
ChatGPT (the conversational front-end to GPT 3.5 and GPT 4) includes user configurable custom instructions. They allocate 1500 characters to "what you would like chatGPT to know about you" and 1500 characters to "how you would like ChatGPT to respond."
How does the system preserve custom instructions as the conversation unfolds? Since the context window is constantly shedding tokens on the back-end on the conversation, I'm wondering if the ChatGPT wrapper is regularly reinjecting these instructions into the context under the hood. It could be happening with each interaction or perhaps it happens every x number of tokens. Does anyone have a clue about how this might work?

This question would better fit on the GenAI stack exchange.


text:
How entailment is different from implication?
I am studying logic in my AI course where I have come across the definitions of entailment and logic. However, I am having trouble differentiating between these two concepts. The definition of entailment in the book says "in all possible worlds where the premise is true, the conclusion is also true". Whereas, the implication says, "A implies B means, if A is true, then B is true". Looks like the difference is in "all possible worlds". Can anyone give me a real example that shows the difference between these two concepts?

Have you looked at this post? https://cs.stackexchange.com/questions/72360/how-is-implication-same-as-entailment


text:
Does machine learning philosophy translate into action effectively?
Can anyone tell me how to understand the machine learning philosophy as a guide to the effective use of AI for activism and organizing?


text:
Why does the SIFT algorithm also capture keypoints at points where there is no change in color components?
Why asking image processing in here?
My question is, about image processing. I can't find stackexchange site to ask about image processing, so I asking in here. Image processing is closed at computer vision, in Deeplearning.
Question
I see the SIFT algorithm, and I have some questions. The question is, "If given images are simple colored images, then SIFT algorithm can catch the keypoints?"
So, I make simple images like below with mspaint.exe

I Think SIFT algorithm catch keypoints near edges or outsides of rectangle. But the results are quite different.

Please see the red rectangle at the very bottom of the image. As we can see, SIFT algorithm catch the center of the rectangle.
I think center of the rectangle has not any light changes, so I don't know why this points are keypoints.
Running code
import cv2 as cv

img=cv.imread('test.png') # read image
gray=cv.cvtColor(img,cv.COLOR_BGR2GRAY)

sift=cv.SIFT_create()
kp,des=sift.detectAndCompute(gray,None)

gray=cv.drawKeypoints(gray,kp,None,flags=cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
cv.imshow('sift', gray)

#print(kp)
print(len(kp))
k=cv.waitKey()
cv.destroyAllWindows()


text:
Change face landmarks using face mesh
I'm trying to use computer vision or image processing techniques to make nose smaller. Using a SDK called mediapipe we are able to get face mesh, which provides points to face landmarks. If we want to make the nose smaller, theoretically we should change the corresponding number. But I don't think that's just the coordinates. I guess we have to transform/warp the actual face texture along with it, not just the coordinates of the number.
Is there any tips how this can be done? Some examples or snippets would be great.


text:
Link Prediction Task on Multigraphs with GraphSAGE
I need to perform a link prediction task on a heteronegous multigraph (multi-node types, multi-edge types, multi-edges between pairs of nodes, node features and edge features) in the inductive setting.
I came across GraphSAGE that could perform this task in the inductive scenario, but I do not know whether it could be extended to the context of multigraphs that allow multiple edges (and edge types) between any two nodes. An idea I have in mind is to learn several graphs parallely, each graph consists of all nodes and all edges of an edge type. The problem is some edge features of an edge type can have influence on a connection of another edge type (For example, an attribute from edge type A between node 1 and 2 implies that node 1 and node 2 are connected with another edge type B). Could you help me to formulate the problem and suggest any direction to solve it? Thank you.


text:
Is there anywhere online an AI in the mode of "text completion" besides the OpenAI playground?
By "Text completion" mode I mean that you can input there a full conversation as one single text and the AI thinks that the text you pasted is the past conversation, not a single message.
This way one can start conversation from the middle, and the AI assumes the role. For instance, if in the text above the conversation shows that he tried to agitate you for communism, it will continue doing it further.
It was possible in the text-davinci-003 mode in OpenAI playground.


text:
A practical example of uniform convergence of a hypothesis class
From definition of uniform convergence:

We say that a hypothesis class $\mathcal{H}$ has the uniform convergence property (w.r.t. a domain Z and a loss function $l$) if there exists a function $m_{H}^{UC} : (0,1)^{2} \rightarrow N$ such that for every $\epsilon, \delta \in (0,1)$ and for every probability distribution $\mathcal{D}$ over $Z$, if $S$ is a sample of $m ≥ m_{H}^{UC}(\epsilon,\delta)$ examples drawn i.i.d. according to $D$, then, with probability of at least $1 − \epsilon$, $S$ is $\epsilon$-representative.

I'm wondering if there's some concrete example of uniform convergence $\mathcal{H}$ that illustrates this definition?


text:
How does VRAM usage change when running prompts async through LLMs?
If my LLM uses X GB of VRAM when processing prompts sequentially, does it use 2X GB if I run 2 prompts at once using async support? e.g. using Langchains await chain.arun()
If I ask it to run 10 prompts using async, does that require 10x more VRAM?
How does VRAM scale the more prompts I pass at once?


text:
Variational Autoencoders - Can We Learn Directly From Marginal With a Pretrained Decoder?
So, with VAE we use ELBO instead of directly maximizing the marginal likelihood, because the marginal likelihood is intractable.
As far as I understand it, this is the case for two reasons:

$$p(x) = \int p(x,z) \, dz = \int p(x|z;\theta) \, p(z) \, dz$$
Since we sample our latent variables directly from the prior p(z), which is often given analytically in the form of a simple distribution, we're not bound to sample anything meaningful. That is, if there is a high density in an area $$Z_i$$
it is not bound to have any meaningful connection to, how often its corresponding variable appears in our dataset. Assuming our dataset represents "meaningful" examples, we're essentially sampling and maxing our likelihoods with samples, that carry barely any information and can therefore not help us train the model.

Now, my question is; Isn't this only the case at the beginning of the training process? Or is it only with the VAE, because of the regularization term, that the p(z) begins to carry meaningful information?
What I am trying to say is; At some point, say if we have a pretrained decoder on the same dataset, will the samples that have a high probability in p(z) not also carry some information? Will our decoder not have mapped the relation between those and the images, such that it "forces," those z's which appear often in our sample to represent the images that appear often?
Kind of like how the regularization term in the ELBO loss function forces the posterior to map a relationship between the images that appear often to high probability densities in the Z-space?
So, if we let it run for infinity, we could still theoretically learn this way? I get that it would still be intractable, but this would still help me better understand how VAEs work.


text:
Sampling triplet sets in the field of few-shot learning
I have recently been exposed to the concept of K-way N-shot classification. As far as I realize few-shot learning involves meta training and meta testing sets for training and testing our model, respectively. In each set there are some tasks and each task have query (include K classes containing N samples) and support (include samples from N classes) sets, the sample classes of both sets are the same while the classes of meta training and meta testing are different. On the other hand, in triple loss there are a triple set containing anchor, positive (with same label) and negative (a different label of anchor and positive).
I cannot find suitable solution for samples triplet sets from query and support sets. What is the process for sampling triplet sets in few-shot learning, specifically in the query and support sets, and how does it contribute to the overall accuracy of the model?


text:
How can I use Artificial Intelligence to compare to paragraphs to see if they share the same meaning?
I am looking for a way to compare two paragraphs and see if both share the same meaning.
For example, these two paragraphs have the same meaning, but they are worded differently.
Paragraph 1:
The golden sun dipped below the horizon, casting a warm, orange glow across the tranquil sea. The waves gently lapped at the shore, singing a soothing lullaby. Seagulls glided gracefully through the air, their calls harmonizing with the gentle rustle of palm leaves. As the day bid its farewell, a sense of peace settled over the beach, inviting contemplation and reflection.
Paragraph 2:
As the day drew to a close, the sun's golden rays stretched long shadows over the calm expanse of the ocean. The sea murmured softly, a gentle rhythm that seemed to cradle the world. Birds, with their wings outstretched, soared through the sky, their calls blending seamlessly with the gentle whisper of palm fronds. In this moment of transition, serenity enveloped the beach, inviting introspection and meditation.
Which AI model is able to compare the two paragraphs and determine if they share the same meaning or not? Azure AL Language has multiple models of AI Language, but I don't see one that would help with semantic comparison.
What AI model can be used to provide similarity evaluation of two paragraphs?

There are a lot of document embedding libraries that you can use. They will represent each paragraph as a vector and you can use the distance between these vectors as a proxy for similarity. You will have to decide which distance is the cutoff for the "same" meaning though

Can you please give an example of a document embedding libraries that can be used? Does document embedding libraries actually process the meaning of each paragraph or does it just compare words similarity in both paragraphs?

It does process the meaning, though the primary mechanism is comparing word similarity. Doc2Vec is popular

I can't seems to find a service on Azure that converts Doc to vector. Any Clues if there is a service for this?


text:
How (or can) you formulate the Fisher information matrix in terms of a loss function, specifically cross-entropy loss?
I recently saw the following formulation of the Fisher information matrix in a paper on Transformer pruning:
$$
\mathcal{I} := \frac{1}{|D|} \sum_{(x,y) \in D} \left( \frac{\partial \mathcal{L}(x,y;1)}{\partial m}, \frac{\partial \mathcal{L}(x,y;1)}{\partial m} \right)^T
$$
$\mathcal{L}(x, y; 1)$ here refers to the loss function. However, the usual formulation of the Fisher information matrix, stolen from Wikipedia, is:
$$
\bigl[\mathcal{I}(\theta)\bigr]_{i, j} =
\operatorname{E}\left[\left.
  \left(\frac{\partial}{\partial\theta_i} \log f(X;\theta)\right)
  \left(\frac{\partial}{\partial\theta_j} \log f(X;\theta)\right)
\,\, \right| \,\,\theta\right].
$$
I'm not sure how these formulations are equivalent. While it seems to be presented as fact regardless of the specific loss function in the paper, for what it's worth the loss used is cross-entropy. I've tried deriving one from the other, but I'm not really able to.

if you are looking for the translation between hessian and FIM, probably this could help https://stats.stackexchange.com/questions/68080/basic-question-about-fisher-information-matrix-and-relationship-to-hessian-and-s


text:
Does the accuracy of a regression learner depend on the way we feed data?
Consider a plot of points as such:

As one notices, this looks like an alternating sequence. Further, it can be divided into two subsequences as $a_{\text{odd}}$ and $a_{\text{even}}$ as they seem to be part of a decay envelope separately.
Instead of feeding the entire sequence for the model to learn, if I feed the two subsequences separately, would it be able to predict data more accurately? My intuition says yes because the two subsequences are "nicer" than the sequence as a whole.

What statistical model do you have in the mind? Probably not linear regression nor logistic regression, right?

@CloudCho Sorry for the late reply. I noticed that even linear regression gives a very accurate value.

Do you evaluate your linear regression model by prediction at saturation period (the plat line)? What if you use data from zero to around 10? I don't think linear regression working on oscillation/transition period.

@CloudCho Thats correct. To be more specific, I used sklearn's linear fit function. With only first three input values, it could predict the next 50 values with very high accuracy.

"Only first three" Do you mean f(x=1), f(x=2), and f(x=3)?

@CloudCho yep that is correct

It is hard to believe only there oscillated points could give saturation point with Linear Regression. There is no other suggestion so far, so I guess the output of regression depends on your data. If you have any research on your own question, please feel free post on Answer section. It is ok..just not marked as Accepted, so other(s) may come later and share different points.

@CloudCho I understand. Would you be willing to connect on any social platform so that I can share the program and more about it to you?

I made a chat room at https://chat.stackexchange.com/rooms/149766/regression-input-data. Please, come hand share the code and etc.


text:
Unable to interpret DDPG actor-critic loss curves
I am training a DDPG actor-critic agent and ploting rewards and loss curves each episode to track the training evolution. Rewards values in the plot correspond to the total reward per episode divided by the episode length.
From the curves, it seems that the agent isn't learning much (rewards bouncing at about 0.50+ almost from the begining).
Also, I suspect the critic and actos loss curves are not correct. The critic loss shows a sawtooth pattern and the actor loss drops to negative values. I am not sure this is the correct behaviour.
As a note, I rescale the action output from the actor from [-1, 1] to [-0.03, 0.03] range. The action value that is stored in the Buffer is the scaled one. In the first implementation I didn't do anything about this when fetching a batch for updating the networks. Now, I undo the scaling before computing the losses but still the same results are obtained.
Does anyone have any idea of how to proceed?

to me the actor starts at around 0 reward, and then learns to get to around 0.5, which shows that it has learnt... maybe there is nothing more it can do(?)


text:
What algorithms could I use if I want to increase the accuracy of matched keypoints in an image pair?
Let's say that I used a keypoint detector like SIFT or SuperPoint to detect keypoints in image 1 and 2. Afterwards, I used a keypoint matcher to match corresponding keypoints in this image pair. The first screenshot below shows the zoomed-in patches around a matched keypoint pair (keypoints are incidated as green dots). You can see that the detected keypoints do not accurately correspond to the same real-world point. I would like to shift one of these keypoints to increase the matching accuracy. What kind of algorithms exist for this purpose?
I've tried to use a CNN to extract feature maps of image 1 and 2, and subsequently convolving the features of keypoint 1 (which has dimensionality $1\times1\times D$ with the feature maps of image 2 (dimensionality $W \times H \times D$), resulting in a kind of probability heatmap indicating where the keypoint of image 2 should be shifted to (see screenshot 2). Sometimes this works, but often it does not (see screenshot 3). Would adding attentional layers help with this problem? Or are there any known algorithms for this purpose?


text:
I have n-dimensional latent representational data, with a y logit label: How do I find peaks in the data using the label?
I essentially need a "find peaks" algorithm for when the input data is n-dimensional.
Specifically, in the latent space of my neural network I have have collected all the training data representations and their corresponding output logit value.
I want to find the "peaks" in the logit values, so I can cluster the data around these peaks. So, for example, if I have 2 peaks in the logit values, I want two centroid values for these peaks in the n-dim data.
It seems "find peaks" algorithms like the one in scipy only work for 1d input data assumed to be in a sequence. Is there any way to do this in n-dim data? Thank you

in other words, you want to take the latent n-dims values of each class and find the modes of these only latents?


text:
In the context of lenet, does C1 refer to the conv layer or the output of the conv layer?
I'm studying lenet.
C1 is the layer
According to a tutorial, C1 is

the first convolutional layer with 6 convolution kernels of size 5× 5.

C1 is the feature map
However, I believe that the part pointed out by the red arrow in the following image represents the first convolutional layer, while C1 refers to the feature maps, which are the output of that layer. Is my understanding correct?


text:
How can Knowledge Graphs be Integrated with Language Models for Semantic Search?
I am exploring the incorporate knowledge graphs (KGs) with language models.
I understand that KGs can provide structured understanding of entities and their relationships which can be crucial for semantic search tasks such as query understanding, and quesiton-answering.
I am particularly interested in practical implementations and would like to know:
What are the common practices for integrating KGs with language models like gpt-4?
I appreciate any insights or references that can guide me in implementing a KG-enhanced gpt-4.


text:
Can A2C deal with a reward that is decided later than action selection?
I am trying to use a policy gradient based RL algorithm, A2C. However, my training case is slightly different from what typical training tragets are. In my case, a reward is given not immediately after an action is selected, but after some intervals in possibly different order.
For example, in general
for epoch in epochs:
  state = agent.get_current_state()
  action = agent.get_action(state)
  reward, next_state = env.evaluate(state, action)
  step += 1
  if step == optimization_interval:
    optimize_model(state, next_state, action, reward, ..)
    step = 0

Let's assume that I want to train mapping jobs to proper machines in cloud system.
for epoch in epochs:
  while all_job_done:
    for job in mappable_jobs:
      job_specific_state = agent.get_current_state(job)
      machine = agent.get_action(job_specific_state)
      state_list.apppend(job_specific_state)
      action_list.append(machine)
    for job in runnable_jobs: // Mappable jobs can be runnable in random order
      reward = env.evaluate(agent.get_state(job), agent.get_action(job))
      step += 1
      if step == optimization_interval:
        optimize_modeL(get_state(job), get_action(job), reward, ..)
        step = 0

Let's assume that mappable_jobs contained job1, job3, job5 at the first step (not epoch, but one iteration of the while loop), and job 2 at the second step.
Let's assume that its optimization interval is 1.
Let's assume that job 2 was immediately runnable, and optimized the model before job 1 is evaluated. Then the model when job 1's action is decided is different from the one when job 1 is evaluated. And so, it cannot optimize the model correctly.
So I am concluding that A2C cannot be used, but I may use DQN-like models that optimize the model with random states.
My question might be silly as I am a novice on RL, but is this correct?

what DQN can achieve, A2C can too, given enough time, so if your problem is with the RL formulation, i suggest you to search in the literature "delayed reward RL" and use one of the proposed approaches


text:
Is synthetic data just a placebo for immature models?
I apologize for the provocative question, but let me elaborate.
I am trying to wrap my head around the logic of synthetic data.
When you train a model what you are trying to do is to teach the ground truth to the model. You are trying to teach the underlying nature of the problem you are trying to solve.
The real data you have is a partial representation of the ground truth. Or, to put it in another way, it contains a certain amount of information regarding the ground truth.
The more information the model contains the closer the model will get to the ground truth (assuming the model chosen is the right model for the job and the training was performed optimally) and therefore the better it will perform in the prediction.
The process of synthetic data generation is all about trying to understand the ground truth to simulate real data, right?
But since synthetic data is generated (in most cases) from the information contained in the real data, the process of synthetic data generation is not adding any new information. Creating new data points from real data doesn't get us closer to the ground truth, at least logically speaking.
Therefore, is it the case that maybe we need synthetic data only because the current models we have are not mature enough? They need more data points to get to the ground truth, even though the additional data points are not adding more information.
Please show me if any (or all) of my assumptions and/or conclusions are wrong.

depends on the nature of the considered synthetic data


text:
Training ImageNet on Resnet - Dropping LR has little improvement on accuracy
I'm trying to train Resnet50 on Imagenet following this paper [1] as well as this one[2].
They say that at approximately every 30 epochs, I should drop the learning rate by 10.
Since I'm training on 8 GPUs, I adjusted the learning rate according to [1].
$$ \text{Original  } \eta = 0.1 $$
$$ \text{Original  Batch} = 256 $$
$$ \text{Per-GPU } \eta = 0.025$$
$$ \text{Per-GPU Batch}  = 64$$
The problem I have is that when I divide the learning rate by 10 (at convergence $\approx$ 30 epochs), I don't get as much improvement as [1] and [2].

Has anyone else had this issue? Any advice?
Thanks,
Liam


text:
Why does alphago only go to 19 numbers and 19 alphabet letter and not 26 numbers and 26 alphabet letters? Alphago max version?
I was just looking at alpha go videos on youtube that google deep mind sent me and was wondering on the versioning board and it reminded me of a more advanced version of chess game on windows operating system and was just wondering where the game downloadable version of alphago is and if it's safe to play from a maths and comprehension perspective for various ages?
Also why does the english language alphabet only go to 26 letters and not more maths numbers and more "letters?"/symbols?
Whys there no alphago mini version with like 9 numbers side and 9 side letters like sudoku?
https://www.youtube.com/watch?v=V-_Cu6Hwp5U&list=TLPQMzAwOTIwMjNYMDhiHAClYA&index=219&ab_channel=GoogleDeepMind
https://www.deepmind.com/research/highlighted-research/alphago

is this a joke?...

@Alberto Safer to assume good faith intentions here, but difficulty in expressing the question.

Welcome to AI Stack Exchange. We cannot answer definitively why the developers of AlphaGo have not publsihed versions that already allow for larger or smaller boards. It's probably just a time/attention constraint, and there is no benefit to them to cover yet more variations of Go. They have published papers on how it works though, so you can read them, and if you become confident and have time you could make your own. A 9x9 board player should be something a hobbyist could target for a project lasting a few months to a few years


text:
Trouble understanding Variational Inference objective
I was reading the Meta Temporal Point Processes paper and was having trouble understading the training objective presented. The authors state that it is the ELBO used in Variational Inference techniques.

where $L$ is the number of observations, $\tau_{l}$ is a continuous varaible observed $l$th, and $z \sim p_{\theta}\left(z | \mathcal{C}_{L}\right)$ according to the paper, where $C_{l}$ is defined as $\left\{ \tau_{t-k+1:t} \right\}_{t=1}^{l-1}$.
However, the above expression is very confusing, and I have three questions.

$p_{\theta}$ is defined as the distribution of $z$, however, it is used as the distribution for $\tau$ as well?
Why is $p_{\theta}\left(\tau_{l}\right)$ not $0$ given that $\tau$ is a continuous variable?
Why did $\tau_{l+1}$ in the first term become $\tau_{l}$ from $(6)$ to $(7)$?


text:
Is it possible tofind a subset of F_p for large p such that no solutions exist
I'm aware that neural networks are probably not designed to do that, however asking hypothetically:
I have a question regarding the possibility of identifying a subset of $\mathbb{F}_p$ in which a given equation has no solutions.Specifically, I'm dealing with a fourth-degree homogeneous polynomial involving four variables. My goal is to identify a subset of $\mathbb{F}_p$ called $A$ such that when my variables belong to this subset, the equation has no solutions.
To illustrate this concept with a simple example, consider the equation $x + y + z = 0$. If I choose the set $A$ to be $\{1, 2, ..., (p-1)/4\}$, then this equation has no solutions when the variables fall within this set.
Is it feasible to find such subsets for more complex equations as well?
Thank you for your assistance.


text:
How to compensate the receptive field offset in a Fully Convolutionl Network?
I'm studying the Fully Convolutional Networks right now and when it's clear that the receptive field is not dependent on the input size (the whole network in a way is independent from the input size), I'm not sure how the offset coming from the receptive field is handled.

In the above model from the WaveNet paper, for one output node, four input nodes have to be present. What happens if only one input node is passed to the network? Should the data be zero padded to compensate the receptive field? or does this architecture have a build-in mechanism to cope with that?
The goal is a situation where the number of inputs is the same as the number of outputs


text:
Permute inputs of neural network and expect different outputs?
My question is about if it makes sense to define a function (MLP) that takes two feature vectors f1 and f2. However, I want MLP(f1, f2) != MLP(f2, f1). I believe this should be right since in the first case f1 is multiplied by a different subset of weights as in the second case (same for f2). However, conceptually, does it make sense to design an MLP with this behaviour?
Also, as an extra note I would also like MLP(f1, f1) == MLP(f1, f2). I.e, the first feature vector mandates. You might wonder, then why I don't just always input the first feature vector? The idea is that extra feature vectors should work as an extra signal to improve the MLP performance.

extra feature vectors should work as an extra signal to improve the MLP performance then it can't be true that $MLP(f1, f1) == MLP(f1, f2)$


text:
Do Bernoulli bandits need a different treatment if the rewards are sparse?
I have a problem where, effectively, my slot machines have very low payout probability (on the order of 1% for the "best" slot machines) and my goal is to minimize the number of actions to get one reward. I'm wondering if my goal is still equivalent to maximizing long term reward (as in the original formulation). At a higher level, I'm wondering which of the available tools for solving Bernoulli bandit are best to use in my scenario, or even if an altogether different approach would be more appropriate.


text:
claude 2 doesn't know basic math?
Sometimes, when I see answers like this from large language models, it makes me feel disgusted:
Me: Does Voyager 1 have enough velocity to escape the solar system without using Jupiter's gravity assist?
claude: "

Escape velocity at 1 AU from the Sun is 151,560 km/h.
Voyager 1's pre-Jupiter flyby velocity was 169,200 km/h.

Therefore, Voyager 1 absolutely did NOT have enough velocity at 1 AU to escape the solar             system without the Jupiter gravity assist. Its velocity of 169,200 km/h at 1 AU was below the      solar escape velocity of 151,560 km/h."

So my question is:
why can this large language model sometimes solve complex problems but fail to answer basic ones? (The irony is that it became not free before it was ready)

Your post just reads like commentary, I don't see an actual question. What is your question?

@DennisSoemers I mean, why can this large language model sometimes solve complex problems but fail to answer basic ones? (The irony is that it became not free before it was ready)

Please edit your title and body of the post, such that the title actually reads like a question and the body of the post also makes it clear and explicit what the question that you're wondering about is.

@DennisSoemers ok, It's done. But if you have any answer on my question please help, I'm confused?!

My short answer would be that LLMs can never be relied upon to generate factually correct text. That's not what they are explicitly trained for. Especially for things like math they can't be relied upon, because they don't have any mechanisms for symbolic manipulation. They view everything as strings of tokens, and have been trained to produce sequences of tokens that are statistically likely, given the behaviour of humanity all over the internet. They have 0 understanding of text's meaning. But LLMs are not my main area of expertise, probably someone else should write a proper, full answer.

The answer is very simple, the training set contains some of the "complex problems" but very little of the simple ones, the LLM is just reproducing its training set (which is not public).

Hi! Welcome to AI SE. This question has been asked in similar versions about other LLMs, and the reason is all the same. Please see those other questions to get some more responses.


text:
How to differentiate fuzzy matching from artificial intelligence
I am curious about the term "fuzzy matching," and whether it falls under the category of artificial intelligence. Specifically, when can we say that a website or system is using AI, and when do we simply attribute it to clever algorithms or rule-based programming?


text:
Dimensionality Reduction of a matrix preserving number of rows
Let A ($d \times k $) be a matrix such that k < d. How to reduce the dimension of the matrix A to another lower dimension matrix B ($d \times l$ ) such that $l < k$. Note that, while reducing the dimension of columns, we want to preserve the number of rows of the original matrix A. The naive technique is the moving average. Is there an intelligent way to preserve number of rows and only reduce the columns by using some other approximation techniques based on truncated SVD/PCA/UMAP/Matrix Decomposition (linear/non-linear) etc.
I understand that by using standard techniques as truncated SVD, if the above matrix A ($d \times k $) gets projected to a lower dimensional space $l$ then the resultant matrix becomes B'($l \times l$ ).


text:
Training YOLO on YOLO results
I have a large unlabelled dataset. What if I use YOLO to label it? Will this dataset be useful to train a better YOLO model? What if I then finetune it on a smaller labelled dataset? My usecase requires training YOLO from scratch, as finetuning a pretrained model yields worse results.


text:
Calculating Homography for Image Stitching
Given two images that were taken from the same camera by pure rotation about the camera center, I am trying to stitch the images.
I identified the 4 corresponding pair of points by loading in the images using MATLAB's built-in getpts function and identifying similar points of interest across both images. I used the corners of the rooftop buildings as the matching pairs.
This process results in the following points:
city_one_points = [478 137; 616 113; 660 187; 518 271];
city_two_points_one = [878 131; 1024 121; 1062 197; 918 273];

Once the points are identified, I pass them into my compute homography function.
H12 = compute_homography(city_one_points, city_two_points_one);

Once the homography is computed, I attempt to stitch the images but I do not get a side by side stitched image.
tform_h12 = projective2d(H12);
city_one_projected = imwarp(city_one, tform_h12, 'OutputView', imref2d(size(city_two)));

figure;
imshow(city_one_projected);

I am pretty sure my homography function is correct.
I do have doubts on whether I am sourcing the corresponding pair points correctly. Do I have to do any additional processing on the points once they have been identified across both images?
Is my stitching process incorrect?
Attached as references are the compute_homography function and the two reference images that I am using.
function H = compute_homography(pts1,pts2)
    % pts1 -> 3 x 4
    % pts2 -> H x pts1
    % H -> 3 x 3
    % pt2 holds the points of the reference image

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Direct Linear Transformation (DLT) Algorithm                       %
    % Given n >= 4 2D to 2D point correspondences {xi <-> xi'},          %
    % determine the 2D Homography matrix H such that xi' = Hxi           %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % i. For each correspondence xi <-> xi' compute the matrix Ai from   %
    %    (4.1). Ai*h = 0 (zero vector)
    %    h = [h1 h2 h3 h4 h5 h6 h7 h8 h9]^T
    % ii. Assemble the n 2 x 9 matrices Ai into a single 2n x 9 matrix A  %
    % iii. Obtain the SVD of A. The unit singular vector corresponding   %
    %      to the smallest singular value is the solution h.
    % iv. The matrix H is determined from h as in (4.2).
    pts1 = pts1';
    pts2 = pts2';

    [~,column] = size(pts1);

    % Iterate over each point and its corresponding point and find Ai
    % Row -> xi,yi,wi
    % size of A will be 2n x 9
    A = zeros(2*column,9);

    % (Assemble the n 2 × 9 matrices Ai into a single 2n × 9 matrix A.
    for i=1:column
        x = pts1(1,i);
        y =  pts1(2,i);
        x_prime = pts2(1,i);
        y_prime = pts2(2,i);

        A(2*i-1,:) = [-x, -y, -1, 0, 0, 0, x*x_prime, y*x_prime, x_prime];
        A(2*i,:) = [0, 0, 0, -x, -y, -1, x*y_prime, y*y_prime, y_prime];
    end

    % Obtain the SVD and get the smallest singular value of V.
    [~,~,V] = svd(A);
    h = V(:,9);
    H = reshape(h,[3,3]);
end


text:
Possible Reasons for the Discrepancy in Trainable Parameters of the Extended DeepConvLSTM Model
I have implemented DeepConvLSTM baseline Model input are 60×d frames each representing 60 samples with d features. Frames are fed into four consecutive convolution layers with standard rectified linear units (Fig. 2). Input frames are obtained through a standard sliding window procedure (window length: 60; shift: 30). Convolution filters of size 5×1 in all convolution layers expand the 24×d input frame to a two-dimensional array of size 44 × (d × f), where d is the number of features and f (set to 64) denotes the number of filters in each convolution layer. This sequence of 44 resulting feature vectors is then modeled by a two-layer LSTM with 128 hidden units. The final hidden layer of the LSTM represents the embedding of the input frame, which is fed into a linear layer and a softmax to produce the prediction for an input frame.
"I have computed the trainable parameters for the DeepConvLSTM model and compared them with the reported trainable parameters in a research paper. Both sources confirm that the number of trainable parameters for this model is exactly the same, amounting to 1.73 million. This finding provides reassurance that everything is proceeding smoothly and without any discrepancies at this stage."
Now, we further extend DeepConvLSTM by incorporating the attention mechanism; we analyze the 44 hidden states of the LSTM that represent the embeddings for the different parts of an input frame. We consider the first 43 hidden states as the historical temporal context and learn 43 weights corresponding to these states:
past context = [h1,h2,h3,...h43] (Eq.1)
current = h44 (Eq.2)
transformed context = tanh(W1 ×past context+b1) (Eq.3)
weights = softmax(W2 ×transformed context+b2) (Eq.4)
final embedding = past context×weights+current (Eq.5)
Where b1 and b2 denote the biases in the two linear layers, and W1 and W2 represent the 2D matrices in the linear layers. We initially apply a linear transformation accompanied by a tanh linearity, transforming each of these seven vectors of size 128 into seven new vectors of size 128 (Eq. 3). Another linear transformation converts these 43 vectors each to size 1 essentially giving us scores for each of the hidden states. These scores are then passed through a softmax to give the final set of weights (Eq. 4). These weights are used to calculate a weighted sum of all the 43 hidden states to give the final embedding for the past context. This past context is added to the last hidden state to give the final embedding for the input frame (Eq. 5). This final embedding is used for classification as opposed to the last hidden state used by DeepConvLSTM.
"Upon computing the trainable parameters for the extended model of DeepConvLSTM, I have discovered a notable discrepancy compared to the reported figures in the research paper. After incorporating an Attention layer into the DeepConvLSTM architecture, the parameter count for my implemented model has increased to 1.75 million. However, the baseline model in the research paper reports a parameter count of approximately 2.5 million on the same dataset. This significant difference raises concerns and prompts the need for a thorough examination of the situation to identify the underlying problem. Can anyone dive into the details and explore the possible reasons for this discrepancy."


text:
Predicting next 2D location from sparse 2D inputs which are received sequentially
Problem: You toss a coin on a 2D table with known dimension. There are certain regions on the table where the probability of get heads is high. At the maximum you can toss N=20 times at an arbitrary 2D location on the table. For each location, you get heads(1) or tails(0) as an outcome.
Location of Heads form input A, location of Tails form input B. That means the input size to the network can be $N_{h} \times 2$(heads) and $N_{t} \times 2$(tails (could be split as A: 15x2, B:5x2 etc), and it is sequentially updated after every toss.
How do we predict the next location for tossing the coin which maximizes the probability of getting heads?
inputs: 2D location of heads, 2D location of tails
output: Next 2D location to toss
Idea: Initial thinking is to frame it as a binary classifier. Since the input data is extremely sparse(and sequentially recieved), I am struggling to find a way to approach this problem. Any suggestion will be hugely appreciated.


text:
Does the order of iteration affect the answer returned by FIND-S?
This paragraph is from the book Machine Learning by Tom M.Mitchell (Page 26):

Initialize $h$ to the most specific hypothesis in $H$
For each positive training instance $x$
$\;\;\;\;\;\;$.For each attribute constraint $a_i$, in $h$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$If the constraint $a_i$, is satisfied by $x$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$Then do nothing
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$Else replace $a_i$, in $h$ by the next more general constraint that
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$is satisfied by $x$
Output hypothesis h

Now, If there is more than one maximally specific hypothesis consistent with the set $D$ of training examples, Does the order of iteration on the training examples affect the answer returned by this so-called FIND-S algorithm? I think the answer would be yes but I haven't been able to find an example yet.


text:
Why are projected variables in canonical correlation analysis uncorrelated?
Let $x\in R^d$ and  $y\in R^e$ be two vectors with covariance and cross-covariance matrices
$S_{xx}, S_{yy}, S_{xy}, S_{yx}$. The canonical correlation analysis is based on the  projection of $x$ onto a lower dimensional representation $a$ and $y$ onto a lower dimensional representation $b$ such that the correlation between transformed points is maximized:
$a=W^Tx, b=V^Ty$ where $W$ is a $d\times k$ matrix and $V$ is a $e\times k$ matrix and
$k$ is the first k maximum shared eigenvalues of the matrices $S_{xx}^{-1}S_{xy}S_{yy}^{-1}S_{yx}$ and $S_{yy}^{-1}S_{yx}S_{xx}^{-1}S_{xy}$.
Question: are $a$ and $b$ uncorrelated? If so, why?


text:
Seeking methods to incorporate arbitrary actuator faults for Control Optimization
I am working on a problem where a control method, backed by a Neural Network (NN), dictates the movement of a 1D actuator to influence a specific process. This actuator can move linearly within a set range (e.g., 10 units to the left and 10 to the right) at a predetermined speed (e.g., 10 units/second). The current position can be observed whilst the target location of the actuator is set by the control method, meaning that it will move towards that position at the set speed * time interval each iteration.
The primary objective of the control method is to optimize this process, and the actuator's movement is a critical variable (among others) it adjusts to achieve this. I'm interested in introducing various potential faults into the actuator's operation, such as:

The actuator getting stuck at a certain position.
The preset range might change.
The actuator can only move at set intervals.
It might get delayed.
The movement speed might depend on the current location.

There are a lot more faults that occur (this description is a simplified version). I aim for a method to handle these faults without (or with limited) prior knowledge of what they could be. However, I need to pass some form of information to the main control method so that its NN can handle it effectively.
A potential approach I am considering is using a Recurrent Autoencoder. This would take the current and target positions as inputs and provide the next predicted position as an output. I anticipate that the latent space from this might be an useful input for the main control methods. While this approach might handle unexpected faults (also ones that arise during the process), especially with adequate training data, it feels somewhat unconventional (and has some obvious downsides that retraining this encoder does not hold any consistency for the other network).
Are there any suggestions for methods or resources that could guide me in this challenge?

Do you want to just detect that a fault has happened, or to optimally compensate for it after it has happened? The actuator probably uses a PID controller, do you have access to its internal signals, e.g. whether it is saturating its actuator (pushing with max force) or how hard it has to push to maintain speed?

Just the detection that a fault has happened. The only the controller just sets the target position and has no other control. It can observe the current position.


text:
Why is $z$ considered a random variable in the following formulation of Locally Linear Embedding Problem?
The following is the derivation of "Locally Linear Embedding Problem" from the book
Machine Learning, 4-th edt, page 152, by E.Alpaydin.

Why is $z$ considered a random variable so that $E(z)=0$ and $Cov(z)=I$ are put as constraints?


text:
What are w0 and w1 respectively after training with the following two examples of (x, y) in the given order?

The answer is supposed to be w0 = 2.8229, w1 = 2.4686. I'm not sure how that is the case.
Can you please also show how you arrived at the solution?

$w_i = w_i - \alpha \nabla MSE$, apply it with the different points updating the weights

How do you calculate the gradient for each weight each time? Can you please explain?

@LuminousStar It's written in your post, no? Otherwise, the gradient is just the vector of partial derivatives. If you don't know what a derivative is, then this question is quite difficult. A partial derivative is just a derivative where you consider other variables (in this case, weights) to be constants.


text:
Exploring the Similarity of Sibling’s Voices Using Automatic Speaker Recognition
I want to start project on Exploring the Similarity of Sibling’s Voices Using Automatic Speaker Recognition

Everyone has a unique voice, because of the different structure of their articulatory organs. Some people have similar voices due to biological similarity or someone is mimicking them. This similarity raises a security concern. Several studies tried to distinguish between similar voices of people using speaker recognition techniques. Speaker recognition not only models an individual’s voice but also their speaking habits. This study surveys the use of automatic speaker recognition techniques in order to explore the similarity between siblings. This includes comparing the performance of several models, such as artificial neural networks (ANNs), Gaussian mixture model (GMM) and i-vector. In addition, a dataset of sibling speech is recorded and processed to be available for public research.

and want to know what to learn in order to make this project and if there any recommended recourses?


text:
Discussion about Improving Visual Search Model Accuracy
My Visual Search Model is only achieving an accuracy of about 42% If anyone can give me advice to drastically improve this number I would greatly appreciate it. Below is my current flow of image augmentation, resnet-50 finetuning, and prediction
I'm currently in the process of trying to fine-tune resnet-50 on trading cards for visual search. I'm currently freezing all layers to retain the pretrained learned (features?) and replacing the top layer with the number of classes i'm training on.
In this case 263/~18000 classes that exist. I'm generating 30 augmentations for each of the original images of the 236 classes I'm fine-tunning with and then resizing all images to 299 x299.
I'm using cross-entropy as my loss function. The training and validation loss converges with very minimal improvement after about 100 epochs.
I'm then using the final layer of the model to extract 2048 dimensional vector representations of each of the 18000 ground truth classes/images.
I upsert these vector representations for each of my classes, 1 for each class, into a Pinecone db.
I then use the same fine-tunned feature extractor to generate vector representations for a set of test images, query pinecone and compare with the ground-truths using Euclidean distance to retrieve the most similar vector and class for that vector.


text:
Offline CartPole on infinitely long line?
I am tentatively exploring some RL research that involves doing offline RL on a version of the Gymnasium CartPole where the cart can move on $\mathbb R$, as opposed to the standard version (see link) where the cart can move on $(-4.8, 4.8) \subseteq \mathbb R$.
I have begun looking at the CartPole code here, but I'm neither an expert programmer nor familiar with the Gymnasium codebase.
Question: Does anyone have any advice for modifying the Gymnasium CartPole code to support movement on $\mathbb R$? I am not sure how big of a change this would be.
Because I am interested in doing something related to offline RL, I also need to run the CartPole MDP, given a certain policy, and generate a dataset of tuples $\mathcal D = \{ (\mathbf s_t, \mathbf a_t, \mathbf s_{t + 1}, r_t)\}$, over some trajectory or trajectories.

The default CartPole allows the cart to travel in $(-4.8, 4.8)$ and terminates the episode if the cart leaves $(-2.4, 2.4)$. One possible solution I will explore is to check whether these are simple parameters in the code. If they are, then maybe I can just adjust them to positive and negative infinity and my problem might be at least partly solved.


text:
Could you recommend action recognition dataset?
background
I want to do action recognition for academic, but I can't find dataset what I want.
so, I wonder Which dataset is suitable for me...
What I want?
I want to find dataset such as..

labeling with joint point. example image.
If labeling more detail, such as " joint point + eye point + ear point + etc" is okay.

many categories with clearly defined actions.
I see some datasets, but they grouped poses with big categories. For example, Jumping category. They grouped jumping with jumping with one leg, jumping with two leg, jumping along in a squatting position ... etc. These are jumping, but These are not actually same pose. Another examples are eating. eating hamburger, eating with forks, eating with spoon, eating with chopsticks are really different but similar actions. also, these are not good for classification.

similar frames per recording actions.(not necessary condition)
Some datasets are not same frames per poses. For example, running is 520 frame, walking is 300 frames. These numbers just for explain, not real frames. I hope frame numbers are similar each others, but I knew that it is difficult to unify the number of frames. So, this is not necessary condition.

Many recordings per each category.(not necessary condition, but I really want to find it)
I want to find many recordings per each category, but recordings are not various. When I open some dataset, each categories are about 20~50 recordings. BUT I need more categories over 500 recordings for each training, test data.
Few category(about 10 category) available is okay, but many recordings are necessary to me. I knew that it is difficult to make many recordings. So, this is not necessary condition.

free or less constraints dataset access
If dataset has contraints such as needed sign up or for use local residents, It can hard to access anyone. I want to share my experiment when my experiment get good results. But if dataset access are limited, then It can hard to share my experiments.

What I found?

human3.6m dataset. However, It takes very long time to get account. I wait for over 1 month, but any contacts came to me.
some limited dataset. It has many constraints(such as only use local residents, only use members, etc), so it doesn't help to me.

I will update the lists when someone recommend dataset to me. Thank you.


text:
How is the accuracy as a metric in a Keras machine learning model calculated? Is it a valuable metric for LSTM
I'm training a LSTM neural network for time series prediction in Keras. During the training of the model, the loss (mse) gradually decreases each epoch, but the accuracy as well as the validation accuracy stays rather low and doesn't really change.
The input set for the model is the energy consumption of a company for the last five days, recorded every 15 minutes. The output is the list of energy consumption during the next day, also recorded every 15 minutes. Is the accuracy a valuable metric to evaluate the model in this case, since I'm not trying to predict just one value?
I tried changing the model architecture, hyperparameters, etc. Nothing really changed, so I suppose the issue lies in the type of output format and the way the accuracy is being calculated.


text:
How to extract features from patterns in time series data
I have a time series welding data I wanted to create a model which can predict some weld parameters but extracting those parameters from time series data is being so difficult.
Currently I tried taking two pointers and sliding window on the time series data and calculating slope and detecting the state and extracting those features here but that doesn't working properly it relays on slope and it's too complex and it's too difficult to hard code all condition for different wirefed speeds. What is the best and accurate way to achieve this (I'm relatively new to ml and stuff).
Features I'm trying to extract:

background time
background current
slope up time
peak current
peak time
slope down time
detachment time

I wanted to calculate these parameters for each of the wave and take the average value and build a model which takes these as features.


text:
Individual Data point size within a dataset for finetuning for translation
I need to fine tuning a LLM for a translation task for specific domain. Could someone please advise if length of each data point within the data set has any impact on eventual performance of the LLMs. which approach is better - using data of longer length (e.g. large sentences , say closer to context length) or using shorter length data points (smaller sentences). The former is easier for me, while the later seems more intuitive.
TIA.


text:
How to apply DRL to solve a problem that involves mixed discrete-continuous action spaces where the action's size changes over time?
I have a reinforcement learning problem where a possible action is a probability vector $[p_1\ldots,p_n]$ of size $n\in\{1,\ldots,N\}$, where each element $p_i$ of the vector is between $0$ and $1$ and the sum of the elements of the vector is $1$, $\sum_ip_i=1$.
At each step, the RL agent should choose the value of $n$ and the elements of the vector. You can see this problem as a resource allocation problem between different machines where the agent should first choose the machines to which it should allocate resources (i.e., chooses $n$). Then, it should partition the resources. among those $n$ machines.
I have two questions.
The first one is: How can I solve this problem using DRL? In fact, as you see it is a mixed discrete-continuous action RL problem where the action size can change at each step. Do you have any useful idea or reference (code or paper) that I can use to solve this kind of problem? I thought of making it fully continuous RL problem, but I still do not see how...
My second question comes after trying to make the problem fully discrete problem. Since I have probabilities as actions, I thought that I can make them as proportions and thus discretize the action. So, the RL agent has to choose $n$ and the number of resources to allocate to each machine $1,\ldots,n$. The problem here is the size of the action space. In my problem, there are very large numbers of discrete actions according to the way I partition the resources. I can easily have 5 billions discrete actions.
Can DRL really solve such discrete action problem?

Is there a reasonable max $n$, and are there any assumed or expected properties of the vector such that similar vectors should obtain similar rewards? Also, what is the state like, and the state progression?

Yes, a reasonable value of max $n$ is ${2,3,4}$ out of $N$ machines. I don't know how to define similar vectors. I think if they are very close to each others like having $p_i=0.12$ and $p_i=0.13$, then they must have similar rewards. Because $p_i=0.12$ and $p_i=0.13$ means that some proportions of the resources are assigned to machine $i$ and thus almost the same number of resources are assigned to $i$. My state is the 3D positions of the $N$ machines so it can be seen as a continuous space $[0,1]^{3N}$.

Do the machines change position based on the action choice?

No, the position changes according to some mobility model (according to the transition from state to state).

So the action choice has no effect at all on what happens next? It is just to collect some immediate reward? Sorry to keep asking these questions, but this is important to clarify the nature of the problem. I'm starting to suspect you don't have a full RL problem here, which opens up other possibilities. So as well as clarifying/confirming my questions above, could you state whether your goal with the question is to ask about this specific issue in an RL context, or whether you are trying to find any solution to train your predictive model for maximising reward?


text:
Can mAP(mean average precision) use at classification problem?
I have some questions about mAP(mean Average Precision).
In object detection problem, mAP use to measure performance broadly.
But, Is it possible to use mAP in multi-class classification problem?
I read this webpage to learn mAP. Then I think mAP can use multi-class classification problem, because detection problem use IoU for decide False positive(FP) or True Positive(TP). But classification problem also can decide TP or FP without using IoU, right?
So if that idea is true, then we can get recall and precision score in classification problem. Then we can plot precision-recall curve, then we can calculate AP by taking the area under the PR curve!
So I think mAP can also use at classification problem, but I can't find using mAP score in classification problem. Is my idea are false?
Thank you.
===edited===
I found some link to explain multi-class mAP, but I'm not sure that this methods are true.
Because, I can't understand in Average Precision (AP) paragraph. Why he said class a, the possible recalls are T=1 (see here for why we ignore T=2 and T=3) and class b, the possible recalls are T=2, T=3. I can't understand that how to pick a T value.


text:
The training process of a conditional GAN
For example, consider a dataset like MNIST. I give the conditional vector to produce only the number $7$ for both the generator and discriminator. In the following scenarios, what will the discriminator classify as fake or real:
The generator produces realistic numbers other than $7$, such as a realistic number $9$ ?
The samples from the MNIST dataset that are not the number $7$ (i.e., other numbers) ?

Hi @abcd and welcome to AI Stack Exchange! If possible, editing this post to change the title to a specific question may aid in getting answers more quickly. Thank you for posting, and we look forward to more of your questions in the near future!

I assume you mean how to label the image and class inputs since the discriminator can reasonably output either "real" or "fake" labels for either of those inputs, and you generally want to be training with an imperfect discriminator.
In both your scenarios the correct ground truth for training the discriminator is "fake", although it may be better to think of it as "incorrect" in the case of mislabeled real inputs.
You may also reasonably decide not to train with mislabeled real images. They are not necessary, and although they might improve the discriminator training, that's not going to make a difference for the MNIST digits task.
You shouldn't train with deliberately mislabeled generator images, either. If the generator accidentally makes a "1" when you asked it to generate a "7", then you should label ground truth as "fake" for training the discriminator and "real" for training the generator, plus in both cases you should include the attempted "7" as input to the discriminator alongside the generated image

I'm actually trying to understand the training process of cGAN and how the discriminator will classify in those cases. That's what I'm trying to ask

@abcd - what the discriminator's actual output would be? That is covered in the first paragraph. It would not be consistent.

What do you mean by 'not consistent'? Didn't you assign the correct labels to the discriminator in the implementation? For example, images generated by the generator that are not correlated with the conditional vector, no matter how realistic they are, will be considered fake. Similarly, real images from the dataset that are not correlated with the conditional vector will also be considered fake. This is my point

@abcd That is what the rest of my answer after para 1 already says - what the target labels are. You then commented that you want to know what the actual output will be. That is different. The discriminator does not immediately output the target output during training. It slowly learns and becomes better at it over time as part of the training process. It is not really possible to predict in advance whether the discriminator's output will be "correct" at any particular stage of training.

Thanks for your help

I thought that in the original conditional GAN (cGAN), the discriminator only classified images as fake or real. Does it also verify if the images match the condition label ?

@David it classifies the whole input data, the image plus the condition label. There isn't a separate verification AFAIK, although that could be a valid architecture. However, something has to check the condition holds, the generator otherwise has no way to receive feedback whether it has matched the constraints

@NeilSlater, something has to check the condition holds so this means the original cGAN lacks this capability. I'm not sure if the generator sometimes ignores the conditional label, and the discriminator also ignores the conditional label

@David The original cGAN does have this capability, built into the discriminator's bool output (it is only true for generations that are in the target dataset and match the condition). Otherwise there would be no point to adding the condition. It's simply not something that would be named or published. Yes sometimes the generator and/or discriminator will give wrong answers, because they are not perfect

In the first case, I think the discriminator will classify those realistic numbers as real because they look real and can fool the discriminator.
As for the second case, I also think the discriminator will classify them as real because the numbers are from the dataset.


text:
Can't get a correct accuracy on tabular data using deep learning
This is my first message here, and I would like to seek some assistance !
I have a technical test for a job that I really want, and I have 10 days to complete it. I've attempted to work on it, but I'm struggling to achieve the desired accuracy. The interviewer mentioned they achieved 0.95 accuracy in literature, but I can't surpass 0.52 on my validation set for a 10-class classification task.
Here's the challenge: I have no information about the origin of the data. There are no names on the features column, and no details on the classes. All I have is a training set of 50,000 examples with 1024 continuous features (already scaled between 0 and 1), and a test set of 10,000 examples.
I've experimented with various models, including xgboost, random forest, SVM, transformer, and more. I even considered the possibility that the data might be images of 32 x 32 pixels in grayscale.
The only hint provided is: "Tips: Tabular data are unstructured by definition. Finding the underlying structure will strongly enhance your results."
Up to now, I've employed data visualization to check for anomalies such as significant outliers or missing data, but I haven't found anything noteworthy. I've also attempted dimensionality reduction techniques like PCA, where 75 components explain 0.9 of the variance. Despite fine-tuning multiple models, my best model (a simple multi-layer perceptron with 75 components PCA) achieves no more than 0.52% accuracy.
I've also experimented with different scaling methods, such as standard scaling or min-max scaling.
I attempted to identify the problematic class, but upon reviewing the classification report, it appears that each class has an approximately 0.5 accuracy.
Does anyone have ideas on what kind of preprocessing steps I could take with the data ?
(I can provide the data and my notebooks !)
Thanks for your help !


text:
Specifying multiple sources of RAG in different formats
I am considering whether to do RAG or Fine tuning for LLM to answer questions for clients in a small business
The small business is a car rental company that gets

new clients call up about certain cars in the fleet to discuss renting them for dates X to Y, ask for price,
existing clients/renters calling to coordinate car pickup, drop-off, finalise contract, insurance etc

The company has data for last 5 years where a customer care team has been fielding these questions, and answering questions based on a set of documents; but also checking the a rota /time table/database about which cars are available, which cars have problems and are out for repair, and consulting documentation about pros/cons of each car
The current customer care also discuss questions one does not know with others in the team in a free flowing slack workspace with around 10 different slack channels (say one for "Repairs", one for "insurance" , one for "security deopsit" etc - there are various slack channels where relevant conversations happen - but these are free flow, they dont always conform to question and answers as these are internal to the team)
I want to explore how to put all the data  I have

Slack archives, perhaps i can dump each channel history for last 5 years as text dump
Conversation history with clients(where each client emails us and we have threads of email conversation back and forth). These conversations are in a CRM and have rich-data/tags like each conversation is tagged with model of car, dates, price paid, customer satisfaction rating etc

How can I feed all of these to a LLM, and also give it the rota/state of the business for each day - in terms of which cars are avilable are current available and which are booked till what date
and, use it to answer questiosn from new clients?


text:
DDPM - why after adding gaussian noise to image, we assume that new image is from normal distribution?
I have a question about forward process in DDPM. It is described as we sample our image from some distribution: $x_0\sim{q(x)}$ then in each time stamp $T$ we are applying gaussian noise $\epsilon\sim\mathcal{N}(0,1)$ and we can describe this as $q(x_{t}|x_{t-1}) =\mathcal{N}(x_{t},\sqrt{1-\beta_{t}}x_t,\beta_{t}I)$ ($\beta{t}$ is some scalar - not important yet).My question is how do we know that our new image at time step $T$ $x_{t}$ is from normal distribution? I know that we can add two normal variables by adding their mean and their variances (assumption: independent variables) but as far as I understand we don't have assumption about $x_0$ distribution, we don't know if is it normal distribution and we don't know mean and variance.

a Gaussian random walk  from any point will have a distribution of points that is Gaussian


text:
Question about the Conditioning Augmentation technique?
In the paper StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks, the goal is to convert text descriptions into images. The text encoder encodes the description to produce the text embedding. This text embedding is then fed into the Conditional Augmentation block. The output from this block is combined with the noise vector, then used as the input to the generator, this is the explanation of the Conditioning Augmentation technique:

The text description $t$ is first encoded by an encoder, yielding a
text embedding $\varphi_t$. However, latent space for text embedding
is usually high dimensional ($>100$ dimensions). With limited amount
of data, it usually causes discontinuity in the latent data manifold,
which is not desirable for learning the generator. To mitigate this
problem, we introduce a Conditioning Augmentation technique to produce
additional conditioning text variables $\hat{c}_0$.

More specifically, the conditioning text variable $\hat{c}_0$ is
sampled from an independent Gaussian distribution
$\mathcal{N}(\mu_0(\varphi_t),\sum_0(\varphi_t))$, where the mean
$\mu_0(\varphi_t)$ and diagonal covariance matrix $\sum_0(\varphi_t)$ are
functions of the text embedding $\varphi_t$, both of them are jointly
learned with the rest of the network.

$\varphi_t$ is first fed into a fully connected layer to obtain
$\mu_0$ and $\sigma_0$ ($\sigma_0$ are the values in the diagonal of
$\sum_0$) for the Gaussian distribution
$\mathcal{N}(\mu_0(\varphi_t),\sum_0(\varphi_t))$. The conditioning text
variable $\hat{c}_0$ is computed by
$\hat{c}_0 = \mu_0 + \sigma_0 \odot \epsilon$, where $\odot$ is the
element-wise multiplication and $\epsilon$ is from
$\mathcal{N}(0,I_n)$ ($I_n$ is the identity matrix with $n$ equal to
the dimension of $\varphi_t$). $\hat{c}_0$ is then concatenated with a
standard Gaussian noise vector as the input of the generator.
The proposed Conditioning Augmentation yields more training pairs
given a small number of image-text pairs, and thus encourages
robustness to small perturbations along the conditioning manifold.

Can someone explain the meaning of the first paragraph ?
I have another question, in the second paragraph "$\hat{c}_0$ is sampled from an independent Gaussian distribution $\mathcal{N}(\mu_0(\varphi_t),\sum_0(\varphi_t))$" and in the third paragraph "$\hat{c}_0$ is computed by $\hat{c}_0 = \mu_0 + \sigma_0 \odot \epsilon$" ? So $\hat{c}_0$ can be computed in 2 ways? Are these statements contradict each other ?
In the third paragraph, can someone explain what does this mean and how is this possible: "The proposed Conditioning Augmentation yields more training pairs given a small number of image-text pairs, and thus encourages robustness to small perturbations along the conditioning manifold."
Thanks

I think this question should be asked on Stack Overflow or Cross Validated or Computer Science


text:
Also is there any way to create a gym environment that can be used without registering?
Please see the title: is there any way to create a gym environment that can be used without registering?
To be specific, since we have already created the environment class, is there any way to directly call gym.make on the environment class, without registering the gym environment?


text:
Can I use Prioritized Learning when the transition probabilities are given?
Can I use Prioritized Learning when the transition probabilities are given?
Also, as I can understand, Prioritized Sweeping is suitable when a state space is large. Can I use it when the state space is small (e.g. 10 states)?