Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

HOGWILD!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent

Lock-free parallel SGD can run on shared memory with little loss

  • Problem Parallel SGD has been hard to speed up because the locks that protect shared writes slow every processor down. Each update depends on the previous one, so splitting the work across cores normally needs synchronization.
  • Method Hogwild! lets several processors write to shared memory without locks, so they can overwrite each other's work. It works when each gradient update touches only a few variables, so overwrites rarely matter.
  • Results Hogwild! outperforms locking schemes by an order of magnitude in the paper's experiments. On DBLife with 10 cores it reached a ninefold speedup, while RR reached only a factor of 5.

Why locking limits parallel SGD

SGD is attractive for large learning problems because it needs little memory and learns quickly, but each step depends on the result of the previous one, so it is difficult to split across processors. Many large data sets are preprocessed with MapReduce, yet MapReduce handles iterative numerical work poorly because fault tolerance adds overhead to every pass.

A single multicore workstation offers shared main memory at over 12GB/s and fast disk reads, so the limit on parallel SGD there is synchronization between processors rather than data movement.

Hogwild! answers this by dropping the lock: processors share one decision variable and write individual components whenever they need to. Overwrites between processors can discard progress, so the question is whether the damage stays small when each step touches only a few coordinates.

Sparse cost functions and the lock-free update

The objective is written as a sum over terms, each of which depends only on a subvector of the decision variable. The method relies on the number of terms and the number of variables both being large while each term touches only a few variables, which the authors call sparsity. Sparse SVMs, matrix completion and graph cut problems all fit this form, and each induces a hypergraph whose hyperedges are the variable subsets of the terms.

Three statistics summarize how sparse the hypergraph is: Ω is the largest hyperedge size, ∆ is the largest fraction of hyperedges containing one variable, and ρ is the largest fraction of hyperedges that intersect a given hyperedge. For the sparse SVM, ∆ is the largest frequency of a feature among examples, and for matrix completion both ∆ and ρ are of order log(n_r)/n_r.

Each processor samples a term e uniformly at random, reads the components of x that e touches, computes the term's gradient, and writes each component with a scaled update. The write for component v takes the form below, and only components in e are changed. \[ x_v \leftarrow x_v - \gamma\, b_v^{T} G_e(x), \quad v \in e \] Each single component update is treated as an atomic addition, which common hardware supports without a separate lock, whereas updating many components at once needs an auxiliary lock.

Convergence under bounded gradient lag

The analysis assumes each term is convex, the gradient of f is Lipschitz with constant L, f is strongly convex with modulus c, and the squared norm of sampled gradients is bounded by M almost surely. To make the proofs tractable, the analysis uses with-replacement sampling, where a term is drawn for every update, rather than the without-replacement partitioning used in the experiments.

Proposition 4.1 assumes the lag between computing a gradient and using it is at most tau, and sets the stepsize gamma by a formula involving rho, Omega, Delta and L, M and c. Under that stepsize, after k component updates the expected gap E[f(x_k)-f*] is at most epsilon once k satisfies the bound stated in the proposition. When tau equals zero the bound reduces to the serial SGD rate, and the analysis states that a lag proportional to the number of processors still gives nearly the serial rate while the number of processors stays below n^{1/4}.

The argument first shows a recursion for a_j, half the expected squared distance to x*, of the form in which an effective curvature c_r smaller than c appears because of the update errors. Without-replacement sampling is used in the experiments, but no tractable analysis is given for it, and the authors note that existing analyses of that scheme predict up to a factor of |E| more steps.

Robust 1/k rates from stepsize backoff

The method runs with a fixed stepsize and then reduces it by a constant factor beta in (0, 1) after each epoch, so the stepsize stays below 1/c throughout. Working through the recursion gives an iteration count for the first phase that depends only logarithmically on the initial distance, and a backoff parameter of about 0.37 minimizes the cost of the later phase.

Compared with the serial stepsize gamma_0/k of Nemirovski et al., the constant stepsize protocol has a leading constant of 1.34 when beta is about 0.37, while the Theta-based protocol reaches 1 at Theta = 2. The fix proposed by Nemirovski et al. gives rates of 1/sqrt(k), and the authors state that robust 1/k rates are still possible with the backoff scheme.

Speedups on the RCV1 sparse SVM

The sparse SVM was trained on Reuters RCV1 for the binary CCAT task, with 804,414 examples and 47,236 features, and the training and test sets were swapped to test scaling. Here rho is 0.44 and Delta is 1.0, values that the authors describe as a poor case for Hogwild!. Hogwild! reached a factor of 3 speedup, while RR got worse as more threads were added and was slower than a serial implementation for fast gradients.

For the averaging scheme of Zinkevich et al., each thread touches every example in each pass, so 10 threads do ten times the gradient work of the serial run. The training error after each pass was the same whether run serially or with ten instances, and the authors conclude that averaging gave no advantage on this problem.

All of these runs use a constant stepsize reduced by a factor of 0.9 at the end of each pass over 20 passes.

Matrix completion and the Jumbo problem

The Netflix Prize matrix has 17,770 rows and 100,198,805 revealed entries, and the KDD Cup 2011 task 2 data has 624,961 rows and 1,000,990 columns. The synthetic Jumbo instance is a rank-10 matrix with 1e7 rows and columns and 2e9 revealed entries, and its rho and Delta are both around 1e-7.

With 10 threads, RR is 12% slower than serial on KDD Cup 2011 and 62% slower on Netflix Prize. Hogwild! attains a near linear speedup on KDD Cup 2011 and Jumbo even when data is read from disk, because these datasets do not fit in the allotted memory.

Graph cut speedups

The DBLife multiway cut has 18,167 entities and 180,110 mentions, and each stochastic gradient step computes a Euclidean projection onto a simplex of dimension 18,167, which makes steps slow. Even so, rho is 8.6e-3 and Delta is 4.2e-3, and Hogwild! achieves a ninefold speedup with 10 cores, while RR reaches only a factor of 5.

Effect of gradient delay on RR and Hogwild!

To test slow gradients, an artificial delay was added at the end of each gradient computation on RCV1, and wall clock time was measured across delays. A gradient must take longer than about one millisecond before RR is on par with Hogwild!, and at that cost only about a million stochastic gradients can be computed per hour.

Limitations

The convergence analysis covers only with-replacement sampling, while the experiments use without-replacement partitioning of edges across processors. The experiments show that implementations outperform the theoretical bounds, including a speedup on RCV1 where rho is large. The delayed-gradient protocol that avoids coalescing threads is described but not implemented, so its effect is untested.

Paper info

Authors
Feng Niu, Benjamin Recht, Christopher Re, Stephen J. Wright
Venue
arXiv · Preprint
First published
2011-6-28
Added
2026-11-12
Updated
2011-11-11
Version
v2
arXiv
1106.5730
Category
math.OC · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Feng Niu, Benjamin Recht, Christopher Re, Stephen J. Wright (2011). HOGWILD!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent. arXiv:1106.5730v2. https://arxiv.org/abs/1106.5730v2

BibTeX
@misc{niu2011hogwild,
  title = {{HOGWILD!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent}},
  author = {Feng Niu and Benjamin Recht and Christopher Re and Stephen J. Wright},
  year = {2011},
  eprint = {1106.5730},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1106.5730v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up